/* CannaFarm Auth UI Styles */

.cf-auth-widget {
    position: relative;
}

.cf-auth-widget .cf-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: transparent;
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none !important;
    border: 1px solid rgba(255,255,255,0.35);
    line-height: 1;
    font-family: inherit;
}
.cf-auth-widget .cf-login-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.6);
}
.cf-login-icon {
    font-size: 15px;
}

.cf-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff !important;
    text-decoration: none !important;
    font-family: inherit;
    font-size: 13px;
}
.cf-player-badge:hover {
    background: rgba(76, 175, 80, 0.25);
}
.cf-player-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #4CAF50;
}
.cf-player-name {
    font-weight: 600;
    color: #fff;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cf-player-caret {
    font-size: 9px;
    color: #888;
    transition: transform 0.2s;
}
.cf-player-badge.cf-dropdown-open .cf-player-caret {
    transform: rotate(180deg);
}

.cf-player-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    width: 260px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 99991;
    overflow: hidden;
}
.cf-player-dropdown.cf-active {
    display: block;
}

.cf-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 12px;
}
.cf-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #4CAF50;
    flex-shrink: 0;
}
.cf-dropdown-header-info {
    min-width: 0;
}
.cf-dropdown-username {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cf-dropdown-badge {
    display: inline-block;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.cf-dropdown-stats {
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    display: flex;
    gap: 16px;
}
.cf-dropdown-stat {
    text-align: center;
    flex: 1;
}
.cf-dropdown-stat-value {
    color: #4CAF50;
    font-size: 18px;
    font-weight: 700;
    display: block;
}
.cf-dropdown-stat-label {
    color: #888;
    font-size: 11px;
    display: block;
}

.cf-dropdown-links {
    padding: 8px 0;
}
.cf-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #ccc !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: background 0.15s;
}
.cf-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff !important;
}
.cf-dropdown-link-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.cf-dropdown-link--logout {
    border-top: 1px solid #333;
    color: #888 !important;
}
.cf-dropdown-link--logout:hover {
    color: #ef5350 !important;
}

.cf-auth-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cf-auth-overlay.cf-active {
    display: flex;
    opacity: 1;
}

.cf-auth-modal {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    width: 420px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(76, 175, 80, 0.1);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s ease;
    position: relative;
}
.cf-auth-overlay.cf-active .cf-auth-modal {
    transform: translateY(0) scale(1);
}

.cf-auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 2;
}
.cf-auth-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cf-auth-header {
    padding: 32px 32px 0;
    text-align: center;
}
.cf-auth-header h2 {
    color: #fff;
    font-size: 22px;
    margin: 0 0 4px;
    font-weight: 700;
}
.cf-auth-header p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.cf-auth-tabs {
    display: flex;
    margin: 24px 32px 0;
    border-bottom: 2px solid #333;
}
.cf-auth-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.cf-auth-tab:hover {
    color: #ccc;
}
.cf-auth-tab.cf-active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.cf-auth-body {
    padding: 24px 32px 32px;
}
.cf-auth-panel {
    display: none;
}
.cf-auth-panel.cf-active {
    display: block;
}

.cf-auth-field {
    margin-bottom: 18px;
}
.cf-auth-field label {
    display: block;
    color: #ccc;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.cf-auth-field input {
    width: 100%;
    padding: 12px 14px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cf-auth-field input:focus {
    border-color: #4CAF50;
}
.cf-auth-field input::placeholder {
    color: #555;
}

.cf-auth-submit {
    width: 100%;
    padding: 13px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 6px;
}
.cf-auth-submit:hover {
    background: #43A047;
}
.cf-auth-submit:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.cf-auth-error {
    display: none;
    padding: 10px 14px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #ef5350;
    font-size: 13px;
    margin-bottom: 16px;
}
.cf-auth-error.cf-visible {
    display: block;
}

.cf-forgot-link {
    text-align: center;
    margin: 14px 0 0;
}
.cf-forgot-link a {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.cf-forgot-link a:hover {
    color: #4CAF50;
}

.cf-back-link {
    text-align: center;
    margin: 16px 0 0;
}
.cf-back-link a {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.cf-back-link a:hover {
    color: #4CAF50;
}

.cf-forgot-desc {
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 18px;
}

.cf-auth-success {
    text-align: center;
    padding: 20px 0;
}
.cf-success-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}
.cf-auth-success p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cf-auth-legal {
    color: #555;
    font-size: 12px;
    text-align: center;
    margin: 14px 0 0;
}

@media screen and (max-width: 767px) {
    .cf-player-badge {
        padding: 4px;
        gap: 0;
        border-radius: 50%;
    }
    .cf-player-avatar {
        width: 28px;
        height: 28px;
    }
    .cf-player-name,
    .cf-player-caret {
        display: none !important;
    }
    .cf-auth-modal {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }
    .cf-auth-header {
        padding: 24px 20px 0;
    }
    .cf-auth-tabs {
        margin: 20px 20px 0;
    }
    .cf-auth-body {
        padding: 20px;
    }
    .cf-player-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
}
