/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Meditation Theme Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --tertiary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #fafbfc;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #343a40;
    
    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--white);
    line-height: 1.6;
}

/* Background Animations */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.breathing-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: breathe 6s ease-in-out infinite;
}

.breathing-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.breathing-2 {
    width: 500px;
    height: 500px;
    top: 40%;
    right: -10%;
    animation-delay: 2s;
}

.breathing-3 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    right: 20%;
    animation-delay: 0s;
}

.orb-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    left: 10%;
    animation-delay: 3s;
}

.orb-3 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    right: 15%;
    animation-delay: 6s;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(20px) rotate(240deg);
    }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.logo-section {
    animation: fadeInDown 1s ease-out;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: var(--primary-gradient);
    border-radius: 50%;
    position: relative;
    animation: pulse 3s ease-in-out infinite;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0.9;
}

.title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.card-container {
    display: flex;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.card-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.pulse-indicator {
    width: 12px;
    height: 12px;
    background: var(--success-gradient);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    animation: pulse 2s ease-in-out infinite;
}

.card-header h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

/* Form Styles */
.verification-form {
    margin-bottom: var(--spacing-xl);
}

.input-group {
    margin-bottom: var(--spacing-lg);
}

.input-wrapper {
    position: relative;
    margin-bottom: var(--spacing-xs);
}

.uid-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: var(--font-size-lg);
    font-weight: 500;
    text-align: center;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    outline: none;
}

.uid-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.uid-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.input-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.uid-input:focus + .input-border {
    opacity: 0.2;
}

.input-focus-ring {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -2;
}

.uid-input:focus ~ .input-focus-ring {
    opacity: 0.3;
    animation: glow 2s ease-in-out infinite alternate;
}

.input-hint {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: var(--spacing-xs);
}

/* Button Styles */
.verify-button {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: var(--font-size-lg);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: perspective(1px) translateZ(0);
}

.verify-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.verify-button:active {
    transform: translateY(0);
}

.verify-button.loading {
    cursor: not-allowed;
}

.verify-button.loading .button-text {
    opacity: 0;
}

.verify-button.loading .button-loader {
    opacity: 1;
}

.button-text {
    transition: opacity 0.3s ease;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    opacity: 0;
    animation: spin 1s linear infinite;
    transition: opacity 0.3s ease;
}

.button-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.verify-button:active .button-ripple {
    width: 300px;
    height: 300px;
}

/* Universal Account Button */
.universal-button-container {
    margin-top: var(--spacing-xl);
    text-align: center;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.universal-account-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--tertiary-gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.universal-account-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.universal-account-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.universal-account-button:hover::before {
    left: 100%;
}

.button-icon {
    font-size: var(--font-size-2xl);
    animation: bounce 2s ease-in-out infinite;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.button-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 2px;
}

.button-subtitle {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    font-weight: 400;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Result Styles - Completely Rewritten for Cross-Browser Compatibility */
.result-container {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-lg);
}

.result-container.show {
    opacity: 1;
    transform: translateY(0);
}

.result-container.success {
    background: rgba(46, 213, 115, 0.15);
    border: 2px solid #2ed573;
    backdrop-filter: blur(20px);
}

.result-container.error {
    background: rgba(255, 71, 87, 0.15);
    border: 2px solid #ff4757;
    backdrop-filter: blur(20px);
    min-height: 120px;
}

/* Base result message - simple and reliable */
.result-message {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Error message - bright red, always visible */
.result-message.error-message {
    color: #ffffff;
    background-color: #ff4757;
    font-weight: 700;
    font-size: 1.25rem;
    border: 2px solid #ff3742;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

/* Success message - bright green, always visible */
.result-message.success-message {
    color: #ffffff;
    background-color: #2ed573;
    font-weight: 700;
    font-size: 1.25rem;
    border: 2px solid #26d666;
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.3);
}

.result-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    animation: bounceIn 0.6s ease-out;
}

.result-icon.success {
    background: var(--success-gradient);
}

.result-icon.error {
    background: var(--warning-gradient);
}

.result-icon::before {
    content: '✓';
    color: var(--white);
    font-weight: bold;
}

.result-icon.error::before {
    content: '✗';
}

/* Simple action buttons - no gradients, solid colors only */
.result-actions {
    animation: fadeIn 0.8s ease-out 0.4s both;
    margin-top: var(--spacing-md);
}

.action-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    margin: var(--spacing-xs);
    background-color: #ff4757;
    color: #ffffff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ff4757;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    background-color: #ff3742;
    border-color: #ff3742;
}

.action-button.primary {
    background-color: #2ed573;
    border-color: #2ed573;
    color: #ffffff;
}

.action-button.primary:hover {
    background-color: #26d666;
    border-color: #26d666;
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.4);
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
}

.success-icon {
    background: var(--success-gradient);
}

.chart-icon {
    background: var(--tertiary-gradient);
}

.community-icon {
    background: var(--secondary-gradient);
}

.info-icon::before {
    color: var(--white);
    font-weight: bold;
}

.success-icon::before {
    content: '🎓';
}

.chart-icon::before {
    content: '📈';
}

.community-icon::before {
    content: '👥';
}

.info-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.info-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xl);
    animation: fadeIn 1s ease-out 0.8s both;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    }
}

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

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

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

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }
    
    .title {
        font-size: var(--font-size-3xl);
    }
    
    .subtitle {
        font-size: var(--font-size-base);
    }
    
    .glass-card {
        padding: var(--spacing-lg);
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .social-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .title {
        font-size: var(--font-size-2xl);
    }
    
    .glass-card {
        padding: var(--spacing-md);
    }
    
    .uid-input {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .verify-button {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .breathing-1,
    .breathing-2,
    .breathing-3 {
        width: 150px;
        height: 150px;
    }
    
    .universal-account-button {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .button-content {
        align-items: center;
        text-align: center;
    }
    
    .result-message {
        font-size: var(--font-size-base);
    }
    
    .result-message.error-message,
    .result-message.success-message {
        font-size: var(--font-size-lg);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .breathing-circle,
    .floating-orb {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.8);
        --glass-border: rgba(255, 255, 255, 0.8);
    }
    
    .uid-input {
        background: rgba(0, 0, 0, 0.6);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }
}
