/* Authentication Styles */

/* Nav Bar Adjustments */
.nav-user-container {
    position: relative;
    display: inline-block;
}

.login-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.login-btn:hover {
    background: white;
    color: #ff8ba7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    user-select: none;
}

.avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* User Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3100;
    border: 1px solid #f0f0f0;
}

.user-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.dropdown-nickname {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item {
    padding: 12px 16px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: #fff0f3;
    color: #ff8ba7;
}

.dropdown-item.logout {
    border-top: 1px solid #eee;
    color: #e74c3c;
}

.dropdown-item.logout:hover {
    background: #fdf2f2;
    color: #c0392b;
}

/* Auth Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.auth-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal.show .auth-content {
    transform: scale(1);
}

.auth-header {
    padding: 24px 24px 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.auth-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2d3436;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-header h3 span:first-child {
    font-size: 1.4rem;
}

.auth-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #b2bec3;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.auth-close:hover {
    color: #2d3436;
    transform: rotate(90deg);
}

.auth-body {
    padding: 24px;
}

.auth-form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #636e72;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrapper i {
    position: absolute;
    left: 14px;
    color: #b2bec3;
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2d3436;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.auth-input:focus {
    outline: none;
    border-color: #ff8ba7;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 139, 167, 0.15);
}

/* Email Verification Inline Input */
.auth-input-wrapper.code-wrapper {
    gap: 10px;
}

.auth-input-wrapper.code-wrapper .auth-input {
    flex: 1;
}

.send-code-btn {
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #ff8ba7;
    background: white;
    color: #ff8ba7;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 110px;
    text-align: center;
}

.send-code-btn:hover:not(:disabled) {
    background: #ff8ba7;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 139, 167, 0.2);
}

.send-code-btn:disabled {
    border-color: #e9ecef;
    background: #f8f9fa;
    color: #b2bec3;
    cursor: not-allowed;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff8ba7 0%, #ffb3c1 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 139, 167, 0.35);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px rgba(255, 139, 167, 0.45);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background: #e9ecef;
    color: #b2bec3;
    box-shadow: none;
    cursor: not-allowed;
}

.auth-notice {
    text-align: center;
    font-size: 0.75rem;
    color: #b2bec3;
    margin-top: 16px;
    line-height: 1.4;
}

/* Animations and Spinners */
.auth-spinner {
    animation: auth-spin 1s linear infinite;
}

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