        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        h1 {
            text-align: center;
            color: white;
            font-size: 3rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .subtitle {
            text-align: center;
            color: #f0f0f0;
            margin-bottom: 30px;
            font-size: 1.1rem;
        }

        .filters {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .search-box {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .search-box input {
            flex: 1;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            min-width: 200px;
        }

        .search-box button {
            padding: 10px 20px;
            background: #764ba2;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .search-box button:hover {
            background: #667eea;
        }

        .race-filter {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .race-btn {
            padding: 8px 15px;
            border: 2px solid #764ba2;
            background: white;
            color: #764ba2;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .race-btn.active {
            background: #764ba2;
            color: white;
        }

        .race-btn:hover {
            transform: translateY(-2px);
        }

        .characters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        .character-card {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
        }

        .character-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
        }

        .image-container {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            min-height: 280px;
        }

        .character-image {
            max-width: 100%;
            height: auto;
            max-height: 280px;
            width: auto;
            object-fit: contain;
            display: block;
            margin: 0 auto;
            transition: transform 0.3s;
        }

        .character-card:hover .character-image {
            transform: scale(1.05);
        }

        .character-info {
            padding: 20px;
        }

        .character-name {
            font-size: 1.5rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
        }

        .character-race {
            display: inline-block;
            padding: 4px 10px;
            background: #667eea;
            color: white;
            border-radius: 15px;
            font-size: 0.85rem;
            margin-bottom: 12px;
        }

        .character-details {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 8px;
        }

        .character-details strong {
            color: #333;
        }

        .description {
            font-size: 0.85rem;
            color: #777;
            line-height: 1.4;
            margin-top: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 30px;
        }

        .page-btn {
            padding: 10px 15px;
            background: white;
            border: 2px solid #764ba2;
            color: #764ba2;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: bold;
        }

        .page-btn.active {
            background: #764ba2;
            color: white;
        }

        .page-btn:hover:not(.disabled) {
            transform: translateY(-2px);
            background: #764ba2;
            color: white;
        }

        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .loading {
            text-align: center;
            color: white;
            font-size: 1.2rem;
            padding: 50px;
        }

        .error {
            text-align: center;
            color: #ff6b6b;
            background: white;
            padding: 20px;
            border-radius: 10px;
            margin: 20px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background: white;
            border-radius: 20px;
            max-width: 600px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            animation: modalFadeIn 0.3s;
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
                transform: scale(0.9);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 35px;
            cursor: pointer;
            color: #333;
            transition: color 0.3s;
            z-index: 1;
            background: white;
            width: 35px;
            height: 35px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            color: #764ba2;
            transform: scale(1.1);
        }

        .modal-image-container {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 30px;
        }

        .modal-image {
            max-width: 100%;
            max-height: 400px;
            height: auto;
            width: auto;
            object-fit: contain;
            border-radius: 10px;
        }

        .modal-info {
            padding: 25px;
        }

        .modal-info h2 {
            color: #764ba2;
            margin-bottom: 15px;
            font-size: 1.8rem;
        }

        .modal-info p {
            margin-bottom: 12px;
            line-height: 1.6;
        }

        .modal-info strong {
            color: #333;
        }

        @media (max-width: 768px) {
            h1 {
                font-size: 2rem;
            }

            .characters-grid {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
                gap: 15px;
            }

            .image-container {
                min-height: 240px;
                padding: 15px;
            }

            .character-image {
                max-height: 240px;
            }
        }