        /* Reset e Variáveis */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-gold: #ffd700;
            --primary-dark: #1a1a2e;
            --secondary-dark: #16213e;
            --card-bg: rgba(255, 255, 255, 0.05);
            --text-light: #fff;
            --text-gray: #aaa;
            --text-dark-gray: #888;
            --danger-red: #ff6b6b;
            --success-green: #4CAF50;
            --warning-orange: #ff9800;
            --border-color: #333;
            --shadow-color: rgba(0, 0, 0, 0.5);
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-image: url(assets/img/wp2279344-yu-gi-oh-wallpapers.png);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            background-size: 2200px;
            background-position: -1300px;
        }

        .container {
            max-width: 400px;
            width: 100%;
            text-align: center;
        }

        header>img {
            width: 300px;
            margin-top: -20px;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            color: var(--primary-gold);
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .subtitle {
            color: var(--text-gray);
            margin-bottom: 30px;
            font-size: 1.1rem;
        }

        /* Search Container */
        .search-container {
            margin-bottom: -20px;
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            justify-content: center;
            align-items: center;
            
            
            
        }

        .search-input {
            padding: 12px 20px;
            font-size: 1rem;
            border: 2px solid #444;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-light);
            width: 100%;
            transition: all 0.3s;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary-gold);
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
        }

        .search-input::placeholder {
            color: var(--text-gray);
        }

        .search-btn {
            background: linear-gradient(145deg, var(--primary-gold), #ffb700);
            color: var(--primary-dark);
            border: none;
            height: 50px;
            padding: 5px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        }

        .search-btn:hover {
            background: linear-gradient(145deg, #ffed4a, var(--primary-gold));
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
        }

        .search-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .clear-btn {
            background: linear-gradient(145deg, var(--danger-red), #ff5252);
            color: white;
            border: none;
            height: 50px;
            padding: 5px ;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        }

        .clear-btn:hover {
            background: linear-gradient(145deg, #ff8787, var(--danger-red));
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
        }

        /* Card Container */
        .card-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .image-container {
            position: relative;
            height: 600px;
            background: var(--card-bg);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px var(--shadow-color);
            border: 2px solid var(--border-color);
            cursor: pointer;
            transition: all 0.3s;
        }

        .image-container:hover {
            transform: scale(1.02);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
            border-color: var(--primary-gold);
        }

        .card-image {
            
            height: 100%;
            object-fit: contain;
            transition: opacity 0.3s ease-in-out;
        }

        .card-image.fade-out {
            opacity: 0;
        }

        .card-info {
            width: 100%;
            max-width: 300px;
            padding: 15px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .card-name {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--primary-gold);
            text-align: center;
            word-break: break-word;
        }

        .card-type {
            font-size: 1rem;
            color: var(--text-gray);
            font-style: italic;
            text-align: center;
        }

        /* Loading Spinner */
        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 420px;
            color: var(--primary-gold);
        }

        .spinner {
            width: 20px;
            height: 80px;
            border: 2px solid rgba(255, 215, 0, 0.3);
            border-top: 5px solid var(--primary-gold);
            border-radius: 90%;
            animation: spin 0.5s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Error Message */
        .error {
            color: var(--danger-red);
            padding: 20px;
            background: rgba(255, 0, 0, 0.1);
            border-radius: 10px;
            margin-top: 20px;
            max-width: 300px;
        }

        /* Controls */
        .controls {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            margin-top: 30px;
            justify-content: center;
            align-items: center;
            margin-top: -10px;
        }

        .nav-btn {
            background: linear-gradient(145deg, var(--primary-gold), #ffb70079);
            color: var(--primary-dark);
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            min-width: 140px;
        }

        .nav-btn:hover:not(:disabled) {
            background: linear-gradient(145deg, #ffed4a, var(--primary-gold));
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
        }

        .nav-btn:active:not(:disabled) {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .nav-btn:disabled {
            background: #555;
            color: var(--text-dark-gray);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* Timer Button */
        .timer-btn {
            background: linear-gradient(145deg, var(--success-green), #45a049);
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 8px;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            min-width: 140px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .timer-btn:hover {
            background: linear-gradient(145deg, #66bb6a8e, var(--success-green));
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
        }

        .timer-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .timer-btn.paused {
            background: linear-gradient(145deg, var(--warning-orange), #f57b0063);
        }

        .timer-btn.paused:hover {
            background: linear-gradient(145deg, #ffb84d7d, var(--warning-orange));
        }

        .timer-icon {
            font-size: 1.2rem;
        }

        /* Search Results */
        .search-results {
            margin-top: 10px;
            color: var(--text-gray);
            font-size: 0.9rem;
            min-height: 20px;
        }

        .no-results {
            color: var(--danger-red);
            font-style: italic;
        }

        /* Modal Styles */
        .modal {
            margin-top: -50px;
            display: none;
            position: fixed;
            z-index: 0;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0);
            backdrop-filter: blur(0px);
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            position: relative;
            background: linear-gradient(145deg, #1e1e30, #2a2a40);
            margin: 5% auto;
            padding: 0;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
            border: 2px solid #444;
            overflow: hidden;
            animation: slideIn 0.3s;
        }

        @keyframes slideIn {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid #444;
        }

        .modal-title {
            font-size: 1.5rem;
            color: var(--danger-red);
            text-transform: uppercase;
            font-weight: bold;
            flex: 1;
            text-align: center;
        }

        .close-btn {
            background: var(--danger-red);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .close-btn:hover {
            background: #ff8787;
            transform: rotate(90deg);
        }

        .modal-body {
            padding: 20px;
            overflow-y: auto;
            max-height: calc(90vh - 80px);
        }

        .modal-card-container {
            display: flex;
            gap: 30px;
            margin-bottom: 30px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .modal-image-container {
            flex: 0 0 auto;
        }

        .modal-card-image {
            height: 600px;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            border: 2px solid var(--border-color);
            transition: transform 0.3s;
        }

        .modal-card-image:hover {
            transform: scale(1.05);
        }

        .modal-info {
            flex: 1;
            min-width: 300px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .info-section {
            background: rgba(0, 0, 0, 0.2);
            padding: 15px;
            border-radius: 10px;
            border-left: 4px solid var(--primary-gold);
        }

        .info-title {
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--primary-gold);
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .info-item {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .info-label {
            font-size: 0.85rem;
            color: var(--text-dark-gray);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .info-value {
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--text-light);
            word-break: break-word;
        }

        .info-value.highlight {
            color: var(--primary-gold);
        }

        .full-width {
            grid-column: 1 / -1;
        }

        /* Variações de Imagem no Modal */
        .modal-variations-section {
            margin-top: 20px;
        }

        .modal-variations-title {
            font-size: 1.1rem;
            color: var(--primary-gold);
            margin-bottom: 12px;
            text-align: center;
            justify-content: center;
        }

        .modal-variations-grid {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: start;
            
        }

        .modal-variation-item {
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
            border-radius: 8px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.05);
            padding: 3px;
            position: relative;
        }

        .modal-variation-item:hover {
            transform: translateY(-3px);
            border-color: var(--primary-gold);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .modal-variation-item.active {
            border-color: var(--primary-gold);
            background: rgba(255, 215, 0, 0.1);
        }

        .modal-variation-image {
            width: 80px;
            height: 80px;
            object-fit: contain;
            display: block;
        }

        .modal-variation-more {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-gold);
            font-weight: bold;
            font-size: 0.9rem;
        }

        .no-modal-variations {
            text-align: center;
            color: var(--text-dark-gray);
            font-style: italic;
            padding: 10px;
            font-size: 0.9rem;
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .modal-card-container {
                flex-direction: column;
                align-items: center;
            }
            
            .modal-card-image {
                height: 600px;
            }
            
            .info-grid {
                grid-template-columns: 1fr 1fr ;
            }
            
            .modal-content {
                width: 95%;
                margin: 10% auto;
            }
            
            .modal-variation-image {
                width: 60px;
                height: 84px;
            }
        }

        @media (max-width: 500px) {
            .image-container {
                height: 600px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .search-input {
                width: 100%;
            }
            
            .search-container {
                flex-direction: column;
                align-items: center;
            }
            
            .search-btn, .clear-btn {
                width: 100%;
            }
            
            .controls {
                flex-direction: column;
                align-items: center;
            }
            
            .nav-btn, .timer-btn {
                width: 100%;
                max-width: 300px;
            }
        }