/* Auth UI Styles for PD2 Planner */

/* Profile Button - Bright green, middle-right */
#profile-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, black, #000447);
    color: white;
    padding: 5px 5px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(128, 1, 50, 0.6);
    transition: all 0.3s ease;
    z-index: 4;
}

#profile-btn:hover {
    background: linear-gradient(135deg, black, #000447);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.6);
    transform: translateY(-50%) scale(1.05);
}

#profile-btn svg {
    width: 24px;
    height: 24px;
}

#profile-username {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.auth-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #00ff88;
    cursor: pointer;
    transition: color 0.3s;
}

.auth-close:hover {
    color: #fff;
}

/* Tabs */
#auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.auth-tab.active {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    color: #00ff88;
}

/* Forms */
.auth-form {
    display: none;
}

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

.auth-form h2 {
    color: #00ff88;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.08);
}

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

.auth-error {
    color: #ff4444;
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 20px;
    text-align: center;
}

.auth-submit, .auth-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, black, #000447);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.auth-submit:hover, .auth-button:hover {
    background: linear-gradient(135deg, #00ff88, #00dd77);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

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

.auth-button.logout {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
}

.auth-button.logout:hover {
    background: linear-gradient(135deg, #ff5555, #dd0000);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
}

/* Logged In View */
.auth-stats {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.auth-stats p {
    color: #ccc;
    margin: 8px 0;
    font-size: 14px;
}

.auth-stats span {
    color: #00ff88;
    font-weight: bold;
}

/* Builds List */
.builds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.builds-header h2 {
    margin: 0;
}

.auth-back {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #00ff88;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-back:hover {
    background: rgba(255, 255, 255, 0.15);
}

#builds-list {
    max-height: 400px;
    overflow-y: auto;
}

.build-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.build-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
}

.build-info h3 {
    color: #00ff88;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.build-meta {
    color: #888;
    font-size: 12px;
    margin: 0;
    display: flex;
    gap: 15px;
}

.build-actions {
    display: flex;
    gap: 8px;
}

.build-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.build-load {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
}

.build-load:hover {
    background: linear-gradient(135deg, #00ff88, #00dd77);
}

.build-share {
    background: rgba(255, 255, 255, 0.1);
    color: #00ff88;
}

.build-share:hover {
    background: rgba(255, 255, 255, 0.15);
}

.build-delete {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.build-delete:hover {
    background: rgba(255, 68, 68, 0.3);
}

.loading, .no-builds {
    text-align: center;
    color: #888;
    padding: 40px;
}

/* Scrollbar */
#builds-list::-webkit-scrollbar {
    width: 8px;
}

#builds-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#builds-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

#builds-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Achievements View */
#achievements-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.achievement-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s;
}

.achievement-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateX(5px);
}

.achievement-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    color: #00ff88;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.achievement-description {
    color: #ccc;
    font-size: 13px;
    margin: 0 0 5px 0;
}

.achievement-date {
    color: #888;
    font-size: 11px;
    margin: 0;
}

/* Scrollbar for achievements list */
#achievements-list::-webkit-scrollbar {
    width: 8px;
}

#achievements-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#achievements-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

#achievements-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    #profile-btn {
        right: 10px;
        padding: 10px 15px;
        font-size: 12px;
    }

    #profile-btn svg {
        width: 20px;
        height: 20px;
    }

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

    .build-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .build-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
