/* 
 * Authentication Pages - Apple Design Language
 */

/* Auth Page Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--vibrancy-dark);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.1),
        var(--shadow-large);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    font-size: 56px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--label-primary);
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 15px;
    color: var(--label-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-form input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--fill-tertiary);
    color: var(--label-primary);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
}

.auth-form input:focus {
    background: var(--fill-secondary);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
}

.auth-form input::placeholder {
    color: var(--label-tertiary);
}

.form-hint {
    font-size: 12px;
    color: var(--label-tertiary);
    padding-left: 4px;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--separator);
    margin: 8px 0;
}

/* Buttons */
.btn-block {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
}

/* Error Message */
.auth-error {
    color: var(--system-red);
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    margin: 0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--separator);
}

.auth-footer p {
    font-size: 14px;
    color: var(--label-secondary);
    margin: 0;
}

.auth-footer a {
    color: var(--system-blue);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Page Header (logged in) */
.page-header {
    position: fixed;
    top: 10px;
    right: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.15s ease;
}

.user-dropdown-btn:hover {
    background: var(--fill-tertiary);
}

.user-avatar {
    font-size: 14px;
    opacity: 0.7;
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--avatar-text-color);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-name {
    color: var(--label-secondary);
    font-size: 13px;
    font-weight: 400;
}

.user-page {
    color: var(--label-quaternary);
    font-size: 12px;
}

.dropdown-arrow {
    font-size: 7px;
    color: var(--label-quaternary);
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.user-dropdown-btn:hover .user-name {
    color: var(--label-primary);
}

.user-dropdown-btn:hover .user-avatar {
    opacity: 1;
}

.user-dropdown-btn:hover .dropdown-arrow {
    color: var(--label-tertiary);
}

/* Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--vibrancy-dark);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border-radius: var(--radius-md);
    box-shadow: 
        0 0 0 0.5px rgba(255, 255, 255, 0.1),
        var(--shadow-large);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1000;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-section {
    display: flex;
    flex-direction: column;
}

.dropdown-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--label-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    color: var(--label-primary);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.1s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--fill-secondary);
}

.dropdown-item.active {
    background: var(--system-blue);
    color: white;
}

.dropdown-item.logout {
    color: var(--system-red);
}

.dropdown-item.logout:hover {
    background: var(--system-red);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: var(--separator);
    margin: 8px 0;
}

/* Notification Badge */
.notification-badge {
    background: var(--system-red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.notification-item {
    background: rgba(255, 69, 58, 0.15);
}

.notification-item:hover {
    background: rgba(255, 69, 58, 0.25);
}

.item-badge {
    background: var(--system-red);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Info Button for Auth Pages */
.info-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

/* Modal for Auth Pages */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(28, 28, 30, 0.95);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Manual Modal */
.manual-modal-content {
    width: 1000px !important;
    max-width: 95vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    padding: 0 !important;
    overflow: hidden;
}

.manual-modal-content .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.manual-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}
