* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.font-mono {
    font-family: 'Share Tech Mono', monospace;
}

/* Matrix title glow effect */
.matrix-title {
    color: #00FF41;
    text-shadow: 
        0 0 10px #00FF41,
        0 0 20px #00FF41,
        0 0 40px #00FF41,
        0 0 80px #00FF41;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { text-shadow: 0 0 10px #00FF41, 0 0 20px #00FF41, 0 0 40px #00FF41; }
    50% { text-shadow: 0 0 20px #00FF41, 0 0 40px #00FF41, 0 0 60px #00FF41, 0 0 100px #00FF41; }
}

/* Matrix card styling */
.matrix-card {
    background: #1A1A1A;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.matrix-card:hover {
    border-color: rgba(0, 255, 65, 0.6);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

/* Pill cards */
.pill-card-red {
    background: #1A1A1A;
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.pill-card-red:hover {
    border-color: rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.15);
}

.pill-card-blue {
    background: #1A1A1A;
    border: 1px solid rgba(0, 153, 255, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.pill-card-blue:hover {
    border-color: rgba(0, 153, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.15);
}

/* Pill shapes */
.pill-shape-red {
    width: 60px;
    height: 24px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border-radius: 12px;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.pill-shape-blue {
    width: 60px;
    height: 24px;
    background: linear-gradient(135deg, #4488ff 0%, #0066cc 100%);
    border-radius: 12px;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.5);
}

/* Generate button */
.generate-btn {
    background: linear-gradient(135deg, #00FF41 0%, #00cc33 100%);
    color: #0D0D0D;
    font-weight: bold;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.generate-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.6);
}

/* Loading spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #1A1A1A;
    border-top: 3px solid #00FF41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result frame */
.result-frame {
    max-width: 512px;
    border: 2px solid #00FF41;
    border-radius: 12px;
    padding: 4px;
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, transparent 100%);
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.2),
        inset 0 0 20px rgba(0, 255, 65, 0.05);
}

/* Select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300FF41' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0D0D0D;
}

::-webkit-scrollbar-thumb {
    background: #00FF41;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .matrix-title {
        font-size: 1.75rem;
    }
    
    .result-frame {
        max-width: 100%;
    }
}