/**
 * FGC User Authentication and Account Management - Styles
 */

/* User Menu Button */
.user-menu-container {
    position: relative;
    display: inline-block;
    margin-left: 16px;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    overflow: hidden;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.user-menu-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* User Dropdown Menu */
.user-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

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

.user-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-menu-header-name {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 4px;
}

.user-menu-header-email {
    font-size: 14px;
    opacity: 0.9;
}

.user-menu-items {
    padding: 8px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #1A1A1A;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 15px;
}

.user-menu-item:hover {
    background: #F8F9FA;
}

.user-menu-item-icon {
    width: 20px;
    margin-right: 12px;
    font-size: 18px;
}

.user-menu-divider {
    height: 1px;
    background: #E9ECEF;
    margin: 8px 0;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
    margin-left: 16px;
}

.auth-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.auth-btn-primary {
    background: white;
    color: #88BB0B;
    border-color: white;
}

.auth-btn-primary:hover {
    background: #f0f0f0;
    color: #6A9308;
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

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

.auth-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

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

.auth-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1A1A1A;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6C757D;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: #F8F9FA;
    color: #1A1A1A;
}

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

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

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

.auth-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1A1A1A;
    font-size: 14px;
}

.auth-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: white;
    color: #1A1A1A;
}

.auth-form-input:focus {
    outline: none;
    border-color: #88BB0B;
    box-shadow: 0 0 0 3px rgba(136, 187, 11, 0.1);
}

.auth-form-input::placeholder {
    color: #ADB5BD;
}

.auth-form-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.auth-form-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.auth-form-checkbox-label {
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.auth-form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(136, 187, 11, 0.3);
}

.auth-form-submit:active {
    transform: translateY(0);
}

.auth-form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #6C757D;
}

.auth-form-link {
    color: #88BB0B;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-form-link:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #6C757D;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E9ECEF;
}

.auth-divider::before {
    margin-right: 16px;
}

.auth-divider::after {
    margin-left: 16px;
}

.guest-btn {
    width: 100%;
    padding: 14px;
    background: white;
    color: #6C757D;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guest-btn:hover {
    background: #F8F9FA;
    border-color: #ADB5BD;
    color: #495057;
}

/* Profile Page */
.profile-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin-right: 24px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.profile-email {
    font-size: 16px;
    color: #6C757D;
}

.profile-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 20px;
}

.profile-form-group {
    margin-bottom: 20px;
}

.profile-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1A1A1A;
    font-size: 14px;
}

.profile-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.profile-form-input:focus {
    outline: none;
    border-color: #88BB0B;
    box-shadow: 0 0 0 3px rgba(136, 187, 11, 0.1);
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.profile-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.profile-btn-primary {
    background: linear-gradient(135deg, #88BB0B 0%, #6A9308 100%);
    color: white;
}

.profile-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(136, 187, 11, 0.3);
}

.profile-btn-danger {
    background: #DC3545;
    color: white;
}

.profile-btn-danger:hover {
    background: #C82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.profile-btn-secondary {
    background: #6C757D;
    color: white;
}

.profile-btn-secondary:hover {
    background: #5A6268;
}

/* Trip History */
.trip-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trip-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #E9ECEF;
    transition: background 0.2s ease;
}

.trip-history-item:hover {
    background: #F8F9FA;
}

.trip-history-item:last-child {
    border-bottom: none;
}

.trip-history-station {
    font-weight: 600;
    color: #1A1A1A;
    font-size: 16px;
}

.trip-history-time {
    color: #6C757D;
    font-size: 14px;
}

/* Favorites */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.favorite-card {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.favorite-card:hover {
    background: #E9ECEF;
    transform: translateY(-4px);
}

.favorite-card-name {
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.favorite-card-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #DC3545;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.favorite-card-remove:hover {
    color: #C82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-menu {
        min-width: 260px;
        right: -20px;
    }

    .auth-modal-content {
        width: 95%;
        margin: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin-right: 0;
        margin-bottom: 16px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Support */
body.dark-mode .user-menu {
    background: #2C3E50;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .user-menu-item {
    color: #ECF0F1;
}

body.dark-mode .user-menu-item:hover {
    background: #34495E;
}

body.dark-mode .auth-modal-content {
    background: #2C3E50;
}

body.dark-mode .auth-modal-title,
body.dark-mode .auth-form-label,
body.dark-mode .profile-name {
    color: #ECF0F1;
}

body.dark-mode .auth-form-input,
body.dark-mode .profile-form-input {
    background: #34495E;
    border-color: #4A5F7F;
    color: #ECF0F1;
}

body.dark-mode .profile-card {
    background: #2C3E50;
}

body.dark-mode .trip-history-item {
    border-bottom-color: #4A5F7F;
}

body.dark-mode .trip-history-item:hover {
    background: #34495E;
}

body.dark-mode .favorite-card {
    background: #34495E;
}

body.dark-mode .favorite-card:hover {
    background: #4A5F7F;
}
