/* VIN Decoder Mobile-First Redesign */

.decoder-page {
    padding: 0 !important;
}

.decoder-hero {
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 50%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.decoder-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

.decoder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    border-radius: 24px;
    margin-bottom: 1.75rem;
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4),
                0 0 60px rgba(139, 92, 246, 0.2);
    position: relative;
    z-index: 1;
}

.decoder-icon svg {
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.decoder-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary, #f8fbff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.decoder-subtitle {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary, #cbd5e1);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.decoder-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 50%, rgba(17, 24, 39, 0.95) 100%);
    border: 2px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 2.25rem 1.75rem;
    margin: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(139, 92, 246, 0.1),
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.decoder-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-purple, #8b5cf6);
    margin-bottom: 0.75rem;
}

.decoder-input-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.decoder-input {
    width: 100%;
    padding: 1.125rem 4.5rem 1.125rem 1.25rem;
    font-size: 1.125rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(145deg, rgba(10, 16, 28, 0.95) 0%, rgba(10, 16, 28, 0.9) 100%);
    border: 2px solid rgba(139, 92, 246, 0.25);
    border-radius: 16px;
    color: var(--text-primary, #f8fbff);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.decoder-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15),
                inset 0 2px 6px rgba(0, 0, 0, 0.2);
    background: rgba(10, 16, 28, 1);
}

.decoder-input::placeholder {
    color: var(--text-secondary, #94a3b8);
    opacity: 0.5;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.decoder-counter {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-secondary, #94a3b8);
    background: var(--bg-secondary, #111827);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    pointer-events: none;
}

.decoder-example {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
}

.decoder-button {
    width: 100%;
    padding: 1.125rem;
    font-size: 1.125rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4),
                0 0 40px rgba(139, 92, 246, 0.15);
    letter-spacing: 0.02em;
}

.decoder-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.5),
                0 0 50px rgba(139, 92, 246, 0.2);
}

.decoder-button:active:not(:disabled) {
    transform: translateY(-1px);
}

.decoder-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.decoder-button svg {
    flex-shrink: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    .decoder-hero {
        padding: 3rem 2rem 2rem;
    }

    .decoder-title {
        font-size: 2.5rem;
    }

    .decoder-card {
        max-width: 600px;
        margin: 2rem auto;
        padding: 2.5rem 2rem;
    }

    .decoder-input {
        font-size: 1.25rem;
        padding: 1.25rem 5rem 1.25rem 1.25rem;
    }

    .decoder-button {
        font-size: 1.25rem;
        padding: 1.25rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .decoder-icon {
        width: 96px;
        height: 96px;
        border-radius: 24px;
    }

    .decoder-icon svg {
        width: 56px;
        height: 56px;
    }

    .decoder-title {
        font-size: 3rem;
    }

    .decoder-subtitle {
        font-size: 1.125rem;
    }

    .decoder-card {
        max-width: 700px;
    }
}

/* Badge styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: rgba(34, 211, 166, 0.15);
    color: #22d3a6;
    border: 1px solid rgba(34, 211, 166, 0.3);
}

/* ============================================
   360PX ULTRA-SMALL DEVICE BREAKPOINT
   ============================================ */

@media (max-width: 360px) {
    .decoder-page {
        padding: 0 !important;
    }

    .decoder-hero {
        padding: 2rem 1rem 1.75rem;
        border-radius: 0 0 16px 16px;
    }

    .decoder-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 1rem;
    }

    .decoder-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .decoder-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .decoder-card {
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .decoder-label {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .decoder-result {
        padding: 1rem;
        border-radius: 8px;
    }

    .result-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
    }

    .badge-blue,
    .badge-purple,
    .badge-green,
    .badge-yellow {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
    }

    /* Stack decoder fields vertically on 360px */
    .decoder-input-row {
        flex-direction: column;
    }

    .decoder-input-row > * {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    /* Reduce button sizes */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }
}
