:root {
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #ec4899;
    --accent: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top left, #1e1b4b, var(--bg-dark), #000000);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.app-header .highlight {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(236, 72, 153, 0.4);
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Panels (Glassmorphism) */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out backwards;
}

.full-width {
    grid-column: 1 / -1;
    animation-delay: 0.2s;
}

#roulette-panel {
    animation-delay: 0.1s;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Forms & Inputs */
.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-wrapper label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    flex: 1;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Buttons */
.btn {
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #7c3aed;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-roulette {
    background: linear-gradient(45deg, #f59e0b, #ef4444);
    color: white;
    font-size: 1.1rem;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-roulette:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.btn-roulette:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-delete {
    background: transparent;
    color: var(--danger);
    border: none;
    padding: 0.2rem 0.5rem;
    font-size: 1.2rem;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-radius: 5px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* Lists */
.list-container {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-container li.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
    background: none;
}

.list-container li:not(.empty-state) {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--accent);
}

.settlements li:not(.empty-state) {
    border-left-color: var(--secondary);
}

.history-list li:not(.empty-state) {
    border-left-color: var(--success);
}

.balance-positive {
    color: var(--success);
    font-weight: 600;
}

.balance-negative {
    color: var(--danger);
    font-weight: 600;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 2rem 0;
}

/* Roulette Wheel */
.hidden {
    display: none !important;
}

#roulette-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.roulette-arrow {
    font-size: 2rem;
    color: white;
    position: absolute;
    top: -15px;
    z-index: 10;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    animation: arrowBounce 0.5s infinite alternate;
}

@keyframes arrowBounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(5px);
    }
}

.roulette-wheel {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 5px solid white;
    background: conic-gradient(red 0 90deg, blue 90deg 180deg, green 180deg 270deg, yellow 270deg 360deg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    /* Pürüzsüz duruş için yavaşlayan eğri */
}

/* Spin result box */
.result-box {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--secondary);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
    animation: fadeInUp 0.5s ease-out;
}

.result-box h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.result-box button {
    margin-top: 1rem;
    margin-right: 0.5rem;
}