body {
    margin: 0;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    padding-top: 50px;
}
/* TODO: mobile icin geri donmem lazim */
.app {
    width: 100%;
    max-width: 800px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.dashboard {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 8px 8px 0 0;
}

.dashboard__stat {
    font-weight: bold;
    color: #495057;
}

.dashboard__value {
    color: #228be6;
}

.simulation {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 30px;
}

.seesaw {
    position: relative;
    width: 600px;
    height: 120px;
}

.seesaw__drop-zone {
    position: absolute;
    top: -180px;
    left: 0;
    width: 100%;
    height: 240px;
    background: linear-gradient(to bottom, rgba(34, 139, 230, 0.02), rgba(34, 139, 230, 0.08));
    border-radius: 0 0 0 0;
    border: 2px dashed rgba(34, 139, 230, 0.2);
    border-top: none;
    border-bottom: none;
    z-index: 3;
}

.seesaw__drop-zone:hover {
    background: linear-gradient(to bottom, rgba(34, 139, 230, 0.05), rgba(34, 139, 230, 0.12));
    border-color: rgba(34, 139, 230, 0.4);
}

.seesaw__plank {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 10px;
    background-color: #865c34;
    border-radius: 5px;
    z-index: 2;
    cursor: pointer;

    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: center center;
}

.seesaw__pivot {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);

    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 50px solid #343a40;
    z-index: 1;
}

.seesaw__weight {
    position: absolute;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fa5252;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.seesaw__weight--falling {
    bottom: auto;
    top: -180px;
    z-index: 10;
    --end-top: 30px;
    animation: fallDown 0.4s ease-in forwards;
}

@keyframes fallDown {
    0% {
        top: -180px;
        opacity: 0.6;
    }
    100% {
        top: var(--end-top);
        opacity: 1;
    }
}

.seesaw__weight--preview {
    position: absolute;
    bottom: auto;
    transform: translate(-50%, -50%);
    background-color: rgba(250, 82, 82, 0.6);
    border: 2px dashed #fa5252;
    box-shadow: 0 4px 12px rgba(250, 82, 82, 0.3);
    display: none;
    cursor: grab;
    transition: width 0.15s, height 0.15s;
    pointer-events: none;
}

.seesaw__tick {
    position: absolute;
    top: -25px;
    width: 1px;
    height: 12px;
    background-color: #adb5bd;
    transform: translateX(-50%);
    pointer-events: none;
}

.seesaw__tick--center {
    background-color: #228be6;
    height: 18px;
    width: 2px;
}

.seesaw__tick-label {
    position: absolute;
    top: -42px;
    font-size: 9px;
    color: #868e96;
    transform: translateX(-50%);
    pointer-events: none;
}

.button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.button--danger {
    background-color: #fa5252;
    color: white;
}

.button--danger:hover {
    background-color: #c92a2a;
}

.seesaw__projection-line {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, #fa5252, rgba(250, 82, 82, 0.3));
    transform: translateX(-50%);
    display: none;
    pointer-events: none;
    border-radius: 1px;
}
.seesaw__position-label {
    position: absolute;
    font-size: 12px;
    font-weight: bold;
    color: #fa5252;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    display: none;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.button--secondary {
    background-color: #868e96;
    color: white;
}

.button--secondary:hover {
    background-color: #495057;
}

.button--secondary:disabled {
    background-color: #dee2e6;
    cursor: not-allowed;
}

.log {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.log__title {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
}

.log__list {
    max-height: 150px;
    overflow-y: auto;
    font-size: 12px;
}

.log__item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #228be6;
}

.log__item--left {
    border-left-color: #fa5252;
}

.log__item--right {
    border-left-color: #40c057;
}

.log__item-info {
    color: #495057;
}

.log__item-side {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
}

.log__item--left .log__item-side {
    background-color: #ffe3e3;
    color: #fa5252;
}

.log__item--right .log__item-side {
    background-color: #d3f9d8;
    color: #40c057;
}

.log__empty {
    color: #adb5bd;
    text-align: center;
    padding: 20px;
}

/* Desktop: tick ve label render edilmiyor (JS'de kontrol) */
@media (min-width: 769px) {
    .seesaw__tick,
    .seesaw__tick-label {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 20px;
    }

    .app {
        margin: 0 10px;
        padding: 15px;
    }

    .dashboard {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        padding: 10px;
    }

    .dashboard__stat {
        font-size: 12px;
    }

    .seesaw {
        width: 100%;
        max-width: 500px;
    }

    .seesaw__weight--preview,
    .seesaw__projection-line,
    .seesaw__position-label {
        display: none !important;
    }

    .seesaw__drop-zone {
        border: none;
        background: transparent;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 10px;
    }

    .app {
        margin: 0 5px;
        padding: 10px;
        border-radius: 8px;
    }

    .dashboard {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .dashboard__stat {
        font-size: 11px;
        display: flex;
        justify-content: flex-start;
        padding: 5px 10px;
        background: rgba(255,255,255,0.5);
        border-radius: 4px;
    }

    .dashboard__value {
        margin-left: 4px;
    }

    .simulation {
        height: 250px;
    }

    .seesaw {
        width: 100%;
        max-width: 320px;
        height: 100px;
    }

    .seesaw__drop-zone {
        top: -150px;
        height: 210px;
    }

    .seesaw__plank {
        top: 50px;
        height: 8px;
    }

    .seesaw__pivot {
        top: 58px;
        border-left-width: 15px;
        border-right-width: 15px;
        border-bottom-width: 40px;
    }

    .seesaw__weight {
        font-size: 10px;
    }

    .seesaw__tick {
        top: -20px;
        height: 10px;
    }

    .seesaw__tick-label {
        top: -35px;
        font-size: 8px;
    }

    .seesaw__weight--falling {
        top: -150px;
    }

    @keyframes fallDown {
        0% {
            top: -150px;
            opacity: 0.6;
        }
        100% {
            top: var(--end-top);
            opacity: 1;
        }
    }

    .button {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 200px;
    }
}