/* SiteSim Authentication Styles */

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 100001;
    align-items: center;
    justify-content: center;
}

.auth-modal.show {
    display: flex;
}

.auth-modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    z-index: 1;
}

.auth-modal-close:hover {
    color: white;
}

.auth-modal-body {
    padding: 32px;
}

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

.auth-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: white;
}

.auth-header p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

/* Auth Form */
#auth-form {
    margin-bottom: 16px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    background: #2d2d2d;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-field input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-field input::placeholder {
    color: #666;
}

/* Error message */
.auth-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Submit button */
.btn-auth-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Toggle link */
.auth-toggle-container {
    text-align: center;
    color: #888;
    font-size: 14px;
}

.auth-toggle {
    color: #667eea;
    text-decoration: none;
}

.auth-toggle:hover {
    text-decoration: underline;
}

/* Account dropdown */
.account-dropdown {
    position: fixed;
    background: #1e1e1e;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 100002;
}

.account-info {
    padding: 16px;
    border-bottom: 1px solid #3d3d3d;
}

.account-info strong {
    display: block;
    color: white;
    font-size: 14px;
    margin-bottom: 2px;
}

.account-info span {
    color: #888;
    font-size: 12px;
}

.account-menu-items {
    padding: 8px;
}

.account-menu-items a {
    display: block;
    padding: 10px 12px;
    color: #ccc;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.account-menu-items a:hover {
    background: #2d2d2d;
    color: white;
}

.account-menu-items a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Header auth button */
#auth-btn {
    cursor: pointer;
}

#auth-btn.logged-in {
    color: #4CAF50;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .auth-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .auth-modal-body {
        padding: 24px;
    }
}
