:root {
    --bg-gradient: linear-gradient(135deg, #1e1e2f 0%, #2a2a40 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary: #ff477e;
    --primary-hover: #ff2a6d;
    --text-main: #f8f8f2;
    --text-muted: #a0a0b5;
    --success: #00f5d4;
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-x: hidden;
}

#app-container {
    width: 100%;
    max-width: 600px;
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #ff477e, #ff9a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

#btn-home {
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
}

#btn-home:hover {
    color: var(--text-main);
}

.screen {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    animation: fadeIn 0.4s ease forwards;
}

.hidden {
    display: none !important;
}

/* Modül Seçici Kartlar */
.module-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(255, 71, 126, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Ortak Buton */
.btn-primary {
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 30px;
    box-shadow: 0 8px 15px rgba(255, 71, 126, 0.4);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(255, 71, 126, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-primary:disabled {
    background: #555;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Result Display */
.result-display {
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid var(--success);
    border-radius: 12px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--success);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Çark Özel Stiller */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid var(--primary);
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
    z-index: 10;
}

.wheel-controls {
    text-align: center;
    margin-bottom: 20px;
}

.wheel-items-manager {
    margin-top: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px;
}

.wheel-items-manager h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.add-item-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.add-item-box input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: var(--font-family);
    outline: none;
}

.add-item-box input:focus {
    border-color: var(--primary);
}

.add-item-box button {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.add-item-box button:hover {
    background: var(--primary-hover);
}

#wheel-items-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}

#wheel-items-list li {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.btn-remove-item {
    background: #ff4d4d;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.btn-remove-item:hover {
    background: #ff1a1a;
}

/* Three.js Container */
.three-container {
    width: 100%;
    height: 300px;
    margin: 0 auto 30px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Dice Seçenekleri */
.dice-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.dice-options label {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.dice-options label:hover,
.dice-options input:checked + label {
    color: var(--text-main);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Mobil İyileştirmeler */
@media (max-width: 400px) {
    #app-container {
        padding: 20px;
    }
    
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    
    #wheel-canvas {
        width: 250px;
        height: 250px;
    }
}

/* Kura / Takım Eşleştirme Stilleri */
@keyframes bounceBall {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.ball-animating {
    display: inline-block !important;
    animation: bounceBall 0.5s infinite;
}

.match-pair {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: fadeIn 0.5s ease forwards;
}

.match-pair span {
    flex: 1;
    text-align: center;
}

.match-pair .vs {
    flex: 0 0 40px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
}
