* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23e0e0e0" fill-opacity="0.4"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header .author {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
    font-weight: 500;
}

header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-container {
    max-width: 500px;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.search-container button {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background: #764ba2;
}

.header-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo svg {
    width: 100%;
    height: 100%;
    animation: shutter 3s ease-in-out infinite;
}

@keyframes shutter {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.style-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.style-card:nth-child(1) {
    animation-delay: 0.1s;
}

.style-card:nth-child(2) {
    animation-delay: 0.2s;
}

.style-card:nth-child(3) {
    animation-delay: 0.3s;
}

.style-card:nth-child(4) {
    animation-delay: 0.4s;
}

.style-card:nth-child(5) {
    animation-delay: 0.5s;
}

.style-card:nth-child(6) {
    animation-delay: 0.6s;
}

.style-card:nth-child(7) {
    animation-delay: 0.7s;
}

.style-card:nth-child(8) {
    animation-delay: 0.8s;
}

.style-card:nth-child(9) {
    animation-delay: 0.9s;
}

.style-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.style-card:hover .card-icon svg {
    transform: scale(1.1) rotate(5deg);
}

/* Filter Navigation */
.filter-nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-nav .container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Main Content */
main {
    padding: 40px 0;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.style-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.style-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.card-header h2 {
    font-size: 1.3rem;
    flex: 1;
}

.difficulty {
    padding: 5px 15px;
    background: rgba(168, 216, 255, 0.2);
    border-radius: 15px;
    font-size: 0.85rem;
}

.card-content {
    padding: 25px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 10px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.settings-section p {
    margin-bottom: 8px;
    color: #555;
}

.settings-section strong {
    color: #764ba2;
}

.settings-section ul {
    list-style: none;
    padding-left: 0;
}

.settings-section ul li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
}

.settings-section ul li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Quick Reference Table */
.quick-reference {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.quick-reference h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: 600;
}

tbody tr:hover {
    background: #f5f5f5;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    text-align: center;
    color: #666;
}

footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
    }

    header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }

    .header-logo {
        width: 35px;
        height: 35px;
    }

    header p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .style-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-nav {
        padding: 15px 0;
    }

    .filter-nav .container {
        padding: 0 15px;
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 14px;
        font-size: 0.75rem;
        flex-shrink: 0;
        min-height: 40px;
        touch-action: manipulation;
    }

    .quick-reference {
        display: none;
    }

    .quick-reference h2 {
        font-size: 1.4rem;
    }

    th, td {
        padding: 8px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .quick-reference {
        padding: 20px;
    }

    .card-header {
        padding: 15px;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    .card-content {
        padding: 20px;
    }

    .settings-section h3 {
        font-size: 1rem;
    }

    .settings-section p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    header {
        padding: 15px 0;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .header-logo {
        width: 30px;
        height: 30px;
    }

    header p {
        font-size: 0.85rem;
    }

    .filter-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-width: 60px;
        touch-action: manipulation;
    }

    .quick-reference {
        display: none;
    }

    .card-header h2 {
        font-size: 1rem;
    }

    .card-icon {
        width: 35px;
        height: 35px;
    }

    .card-icon svg {
        width: 20px;
        height: 20px;
    }

    .difficulty {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .settings-section h3 {
        font-size: 0.95rem;
    }

    .settings-section p {
        font-size: 0.85rem;
    }

    .settings-section ul li {
        font-size: 0.85rem;
    }
}

/* Animation for filtering */
.style-card.hidden {
    display: none;
}

.style-card.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
.filter-nav .container::-webkit-scrollbar {
    height: 8px;
}

.filter-nav .container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.filter-nav .container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.filter-nav .container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
