* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 460px;
    text-align: center;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

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

h1 {
    color: #1a1a2e;
    margin-bottom: 36px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-status {
    margin-bottom: 32px;
    padding: 48px 24px 40px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 24px;
    border: none;
    box-shadow: 0 10px 40px rgba(21, 87, 36, 0.12);
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auth-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shineEffect 2s ease-in-out 0.5s;
}

@keyframes shineEffect {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.status-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
}

.check-icon {
    width: 100%;
    height: 100%;
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.check-circle {
    stroke: #2e7d32;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: drawCircle 0.6s ease-out 0.3s forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.check-path {
    stroke: #2e7d32;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck 0.4s ease-out 0.7s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.auth-status h2 {
    color: #1b5e20;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.5s ease-out 0.4s backwards;
}

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

.status-description {
    color: #2e7d32;
    font-size: 1.05rem;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out 0.5s backwards;
}

.status-decoration {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease-out 0.6s backwards;
}

.status-decoration .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2e7d32;
    opacity: 0.4;
    animation: pulse 2s ease-in-out infinite;
}

.status-decoration .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.status-decoration .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.user-details {
    margin-bottom: 28px;
    background: white;
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 18px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.detail-item:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f3f4ff 100%);
    transform: translateX(2px);
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

.detail-icon-wrapper {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
    position: relative;
}

.detail-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.detail-item:hover .detail-icon-wrapper::after {
    opacity: 1;
}

.detail-icon-svg {
    width: 26px;
    height: 26px;
    color: white;
    stroke-width: 2.5;
}

.detail-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.detail-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.detail-value {
    font-size: 1.05rem;
    color: #1e293b;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.4;
}

.detail-badge {
    padding: 6px 14px;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-badge.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    animation: pulseDot 2s ease-in-out infinite;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0;
    animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes pulseRing {
    0% {
        opacity: 0.6;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button.google-btn {
    background: white;
    color: #444;
    border: 2px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

button.google-btn:hover {
    background: #f8f8f8;
    border-color: #d8d8d8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button.google-btn::before {
    display: none;
}

.sign-out {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

.sign-out:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.sign-out svg {
    transition: transform 0.3s ease;
}

.sign-out:hover svg {
    transform: translateX(4px);
}

.test-link {
    display: inline-block;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    margin: 12px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.test-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
}

.test-link:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.error {
    color: #c53030;
    background: linear-gradient(135deg, #fed7d7 0%, #feebc8 100%);
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(197, 48, 48, 0.15);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success {
    color: #22543d;
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(34, 84, 61, 0.15);
    animation: slideDown 0.3s ease-out;
}

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

.hidden {
    display: none;
}

/* Email Authentication Styles */
.divider {
    display: flex;
    align-items: center;
    margin: 32px 0 28px 0;
    color: #a0a0a0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}

.divider span {
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #888;
}

.email-auth {
    margin-top: 24px;
}

.email-auth h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.email-hint {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 12px;
    line-height: 1.5;
}

/* Test Page Styles */
.test-container {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #4285f4;
    text-decoration: none;
    font-weight: bold;
}

.test-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.test-section h3 {
    margin-bottom: 15px;
    color: #333;
}

input, textarea {
    width: 100%;
    padding: 14px 16px;
    margin: 0 0 16px 0;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #a0aec0;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.response {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
}

.response.success {
    border-left-color: #28a745;
    background: #d4edda;
}

.response.error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
        max-width: 100%;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 28px;
    }
    
    .auth-status {
        padding: 36px 20px 32px;
    }
    
    .auth-status h2 {
        font-size: 1.4rem;
    }
    
    .status-badge {
        width: 68px;
        height: 68px;
    }
    
    .status-description {
        font-size: 0.95rem;
    }
    
    .user-details {
        padding: 4px;
    }
    
    .detail-item {
        padding: 16px 14px;
        gap: 14px;
    }
    
    .detail-icon-wrapper {
        width: 44px;
        height: 44px;
    }
    
    .detail-icon-svg {
        width: 22px;
        height: 22px;
    }
    
    .detail-label {
        font-size: 0.7rem;
    }
    
    .detail-value {
        font-size: 0.95rem;
    }
    
    .detail-badge {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    button, .test-link {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .email-auth h3 {
        font-size: 1rem;
    }
}

/* Loading State */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible,
.test-link:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
