/* Sul Sul Dashboard - Custom styles complementing TheSims.css */

:root {
    --sims-green: #39b54a;
    --sims-light-green: #7ed321;
    --sims-dark-green: #1e7a2d;
    --sims-simoleon: #4acd5a;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

/* Background */
.sims-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a3a5c;
    z-index: -2;
}


/* Header */
.sims-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 30px;
    background: #5b9aa9;
    margin: 0 4px;
    border: 2px solid;
    border-top-color: #8fc5d0;
    border-left-color: #7ab5c5;
    border-bottom-color: #2a5a6a;
    border-right-color: #3a6a7a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
}

.sims-header h1 {
    margin: 0;
    color: var(--sims-light-green);
    text-shadow: 2px 2px 0 var(--sims-dark-green);
}

/* GitLab Auth UI */
.gitlab-auth {
    display: flex;
    align-items: center;
}

.gitlab-btn {
    all: unset;
    background: #3a7a8a;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid;
    border-top-color: #6aacbc;
    border-left-color: #5a9cac;
    border-bottom-color: #1a4a5a;
    border-right-color: #2a5a6a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-block;
    box-sizing: border-box;
}

.gitlab-btn::before,
.gitlab-btn::after {
    display: none !important;
}

.gitlab-btn:hover {
    background: #4a8a9a;
    cursor: pointer;
}

.gitlab-btn:active {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.gitlab-btn-small {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.gitlab-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gitlab-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #7ab5c5;
}

.gitlab-username {
    color: white;
    font-size: 0.9rem;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-panel {
    text-align: center;
    padding: 40px 60px;
    min-width: 300px;
}

.login-panel h1 {
    color: var(--sims-light-green);
    text-shadow: 2px 2px 0 var(--sims-dark-green);
    margin: 20px 0 10px 0;
    font-size: 2.5rem;
}

.login-panel p {
    margin: 0 0 30px 0;
    opacity: 0.8;
}

.login-plumbob {
    width: 60px;
    height: 90px;
    margin: 0 auto;
    position: relative;
    animation: plumbobFloat 2s ease-in-out infinite, plumbobGlow 3s ease-in-out infinite;
}

.login-plumbob::before,
.login-plumbob::after {
    content: '';
    position: absolute;
    left: 0;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
}

.login-plumbob::before {
    top: 0;
    border-bottom: 44px solid var(--sims-green);
    filter: brightness(1.2);
}

.login-plumbob::after {
    bottom: 0;
    border-top: 46px solid var(--sims-dark-green);
}

.login-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* App container */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Plumbob (The Sims diamond) */
.plumbob {
    width: 30px;
    height: 45px;
    position: relative;
    animation: plumbobFloat 2s ease-in-out infinite, plumbobGlow 3s ease-in-out infinite;
    flex-shrink: 0;
}

.plumbob::before,
.plumbob::after {
    content: '';
    position: absolute;
    left: 0;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
}

.plumbob::before {
    top: 0;
    border-bottom: 22px solid var(--sims-green);
    filter: brightness(1.2);
}

.plumbob::after {
    bottom: 0;
    border-top: 23px solid var(--sims-dark-green);
}

@keyframes plumbobFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes plumbobGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(57, 181, 74, 0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(126, 211, 33, 1)); }
}

/* Main Dashboard Area */
.dashboard {
    padding: 30px;
    width: 100%;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Widget Panels - using TheSims.css .modal class */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 2px solid currentColor;
    margin: -16px -16px 16px -16px;
    background: rgba(0, 0, 0, 0.2);
}

.widget-header h3 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-icon {
    font-size: 1.2rem;
}

.widget-fullscreen-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(91, 154, 169, 0.5) !important;
    border: none !important;
    border-radius: 3px;
    box-shadow: none !important;
    transition: background 0.2s;
}

.widget-fullscreen-btn::before,
.widget-fullscreen-btn::after {
    display: none !important;
    content: none !important;
}

.widget-fullscreen-btn:hover {
    background: rgba(91, 154, 169, 0.8) !important;
}

.widget-content {
    min-height: 120px;
}

/* Widget Modal (Fullscreen) */
.widget-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

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

.widget-modal-content {
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    overflow: hidden;
}

.widget-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
}

.widget-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-modal-close {
    padding: 4px 12px !important;
    font-size: 1.2rem !important;
}

.widget-modal-body {
    flex: 1;
    overflow-y: auto;
    font-size: 1.1rem;
}

/* Widget Variations */
.widget.widget-large {
    grid-column: span 2;
}

.widget.widget-tall {
    grid-row: span 2;
}

/* Progress Bars (Sims-style needs bars) */
.sims-meter {
    height: 20px;
    background: #1a3a4a;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
    border: 2px inset;
}

.sims-meter-fill {
    height: 100%;
    background: var(--sims-green);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.sims-meter-fill.low {
    background: #c0392b;
}

.sims-meter-fill.medium {
    background: #f39c12;
}

/* List Items */
.sims-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sims-list-item {
    padding: 10px 12px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 3px solid var(--sims-green);
    transition: all 0.2s ease;
}

.sims-list-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: var(--sims-light-green);
    transform: translateX(3px);
}

/* Mode Buttons (Sims-style round buttons on a quarter-circle arc) */
.mode-buttons {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 130px;
    height: 130px;
    z-index: 150;
}

/* Completely override TheSims.css button styles */
.mode-btn::before,
.mode-btn::after {
    all: unset;
    display: none !important;
}

.mode-btn {
    all: unset;
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3a7a8a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid;
    border-top-color: #7ac0d0;
    border-left-color: #6ab0c0;
    border-bottom-color: #1a4a5a;
    border-right-color: #2a5a6a;
    box-shadow:
        inset 0 3px 6px rgba(255, 255, 255, 0.2),
        inset 0 -3px 6px rgba(0, 0, 0, 0.25),
        3px 4px 8px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

/* Quarter-circle arc: buttons positioned along a 90-degree arc */
/* Arc radius ~100px, center at bottom-left corner */
.mode-buttons .mode-btn:nth-child(1) {
    /* 90 degrees - top of arc */
    left: 0px;
    bottom: 100px;
}

.mode-buttons .mode-btn:nth-child(2) {
    /* 45 degrees - middle of arc (cos45 * 100 = 70, sin45 * 100 = 70) */
    left: 70px;
    bottom: 70px;
}

.mode-buttons .mode-btn:nth-child(3) {
    /* 0 degrees - right of arc */
    left: 100px;
    bottom: 0px;
}

.mode-btn:hover {
    background: #4a9aaa;
    cursor: pointer;
}

.mode-btn:active {
    box-shadow:
        inset 0 3px 8px rgba(0, 0, 0, 0.5),
        1px 2px 3px rgba(0, 0, 0, 0.3);
}

.mode-btn.active {
    background: var(--sims-green);
    border-top-color: var(--sims-light-green);
    border-left-color: #5cb85c;
    border-bottom-color: var(--sims-dark-green);
    border-right-color: #2a8a3a;
    box-shadow:
        inset 0 3px 6px rgba(255, 255, 255, 0.3),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        3px 4px 8px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(57, 181, 74, 0.6);
}

.mode-icon {
    font-size: 1.3rem;
    line-height: 1;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard {
        padding: 15px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 200px;
    }

    .widget-grid {
        grid-template-columns: 1fr;
        margin-left: auto;
        margin-right: auto;
    }

    .widget.widget-large {
        grid-column: span 1;
    }
}
