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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #7FB069 0%, #5A9E4E 50%, #4A8840 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.header {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7FB069, #E07A5F, #7FB069);
}

.logo {
    max-width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
}

h1 {
    color: #7FB069;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.left-panel, .center-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    max-width: 100%;
}

.upload-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.upload-section h3 {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 700;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #E07A5F 0%, #D4665F 100%);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.4);
}

.file-label.secondary {
    background: linear-gradient(135deg, #7FB069 0%, #5A9E4E 100%);
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.4);
}

.file-label:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(224, 122, 95, 0.6);
}

.file-label.secondary:hover {
    box-shadow: 0 8px 25px rgba(127, 176, 105, 0.6);
}

.file-label:active {
    transform: translateY(-1px);
}

.file-label input[type="file"] {
    display: none;
}

.separator-text {
    margin: 15px 0;
    color: #999;
    font-size: 0.85em;
    font-weight: 500;
    position: relative;
}

.separator-text::before,
.separator-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
}

.separator-text::before {
    left: 0;
}

.separator-text::after {
    right: 0;
}

.manual-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manual-input input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #FAFAFA;
}

.manual-input input[type="number"]:focus {
    outline: none;
    border-color: #7FB069;
    background: white;
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.15);
}

.manual-input input[type="number"]::placeholder {
    color: #999;
    font-size: 13px;
}

.add-manual-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #7FB069 0%, #5A9E4E 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.4);
}

.add-manual-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(127, 176, 105, 0.6);
}

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

.participant-count {
    margin-top: 20px;
    font-size: 1.2em;
    color: #7FB069;
    font-weight: bold;
}

.wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 25px 10px 5px 10px; /* Üst: 20px, Yan: 50px, Alt: 50px */
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: visible;
}

.wheel-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 750px;
    height: 750px;
    background: radial-gradient(circle, rgba(127, 176, 105, 0.3) 0%, rgba(127, 176, 105, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: wheelGlow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes wheelGlow {
    0%, 100% { 
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(0.9);
    }
    50% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.wheel-container:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2), 0 0 50px rgba(127, 176, 105, 0.3);
    transform: translateY(-2px);
}

/* Titreşim animasyonu kaldırıldı */

.wheel-container.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wheel-container.disabled:hover {
    transform: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.arrow {
    position: absolute;
    top: 15px; /* Üst padding azaldığı için ok da yukarı */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #E07A5F;
    z-index: 10;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

@keyframes arrowBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0);
        filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
    }
    50% { 
        transform: translateX(-50%) translateY(-5px);
        filter: drop-shadow(0 8px 15px rgba(224, 122, 95, 0.5));
    }
}

/* Ok titreşimi kaldırıldı */

#wheelCanvas {
    margin: 20px 0;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.25));
    border-radius: 50%;
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
    z-index: 2;
}

.wheel-container:hover #wheelCanvas {
    transform: scale(1.02);
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.3));
}

.wheel-container.spinning #wheelCanvas {
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.25)) 
            drop-shadow(0 0 30px rgba(127, 176, 105, 0.6));
}

.click-hint {
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #7FB069;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
    background: white;
    padding: 15px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.click-hint.spinning {
    background: linear-gradient(135deg, #7FB069, #5A9E4E);
    color: white;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


.winner-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.winner-section.show {
    display: flex;
}

.winner-content {
    background: white;
    padding: 70px;
    border-radius: 40px;
    text-align: center;
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 
                0 0 100px rgba(127, 176, 105, 0.3);
    position: relative;
    overflow: visible;
    z-index: 1002;
}

.winner-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(224, 122, 95, 0.1) 0%, transparent 70%);
    animation: winnerGlow 2s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes winnerGlow {
    0%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% { 
        transform: scale(1);
        opacity: 1;
    }
}

.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotateZ(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotateZ(720deg);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.3) rotate(-5deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.winner-content h2 {
    color: #7FB069;
    font-size: 3.5em;
    margin-bottom: 30px;
    font-weight: 800;
    animation: titlePulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(127, 176, 105, 0.5);
    position: relative;
    z-index: 5;
}

@keyframes titlePulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(127, 176, 105, 0.5);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(127, 176, 105, 0.8);
    }
}


.winner-name {
    font-size: 3em;
    color: #E07A5F;
    font-weight: 800;
    margin-bottom: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #FFF5F3 0%, #FFE8E3 100%);
    border-radius: 20px;
    border: 3px solid #E07A5F;
    box-shadow: 0 10px 30px rgba(224, 122, 95, 0.2),
                inset 0 0 30px rgba(224, 122, 95, 0.1);
    animation: winnerNameGlow 2s ease-in-out infinite;
    position: relative;
    z-index: 5;
}

@keyframes winnerNameGlow {
    0%, 100% { 
        box-shadow: 0 10px 30px rgba(224, 122, 95, 0.2),
                    inset 0 0 30px rgba(224, 122, 95, 0.1);
    }
    50% { 
        box-shadow: 0 15px 40px rgba(224, 122, 95, 0.4),
                    inset 0 0 40px rgba(224, 122, 95, 0.2);
    }
}

.winner-time {
    font-size: 1.1em;
    color: #999;
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
}

.close-button {
    padding: 18px 50px;
    font-size: 1.3em;
    font-weight: 600;
    background: linear-gradient(135deg, #7FB069 0%, #5A9E4E 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.4);
    position: relative;
    z-index: 10;
}

.close-button:hover {
    background: linear-gradient(135deg, #5A9E4E 0%, #4A8840 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(127, 176, 105, 0.6);
}

.close-button:active {
    transform: translateY(-1px);
}

.participants-list {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-height: 464px;
    display: flex;
    flex-direction: column;
}

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

.participants-list h3 {
    color: #7FB069;
    font-size: 1.4em;
    margin: 0;
    font-weight: 700;
}

.participants-stats {
    background: #7FB069;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.scrollable::-webkit-scrollbar {
    width: 8px;
}

.scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable::-webkit-scrollbar-thumb {
    background: #7FB069;
    border-radius: 10px;
}

.scrollable::-webkit-scrollbar-thumb:hover {
    background: #5A9E4E;
}

#participantsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participant-item {
    padding: 15px 20px;
    background: linear-gradient(135deg, #F4F1DE 0%, #E8E3CA 100%);
    border-left: 4px solid #7FB069;
    border-radius: 12px;
    font-size: 1em;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.participant-status {
    font-size: 0.85em;
    color: #7FB069;
    font-weight: 600;
    background: rgba(127, 176, 105, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
}

.participant-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.clear-list-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: transparent;
    color: #999;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-list-btn:hover {
    background: #FFF5F5;
    color: #E07A5F;
    border-color: #E07A5F;
}

.winners-history {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-height: 753px;
    display: flex;
    flex-direction: column;
}

.winners-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.winners-header h3 {
    color: #E07A5F;
    font-size: 1.4em;
    font-weight: 700;
    flex: 1;
}

.clear-button, .download-button {
    padding: 8px 12px;
    background: transparent;
    border: 2px solid #7FB069;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.clear-button {
    border-color: #E07A5F;
}

.clear-button:hover {
    background: #E07A5F;
    transform: scale(1.1);
}

.download-button:hover {
    background: #7FB069;
    transform: scale(1.1);
}

.winners-info {
    margin-top: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

#winnersList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-item {
    padding: 18px;
    background: linear-gradient(135deg, #FFF5F3 0%, #FFE8E3 100%);
    border-left: 5px solid #E07A5F;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.winner-item-name {
    font-size: 1.2em;
    font-weight: 700;
    color: #E07A5F;
    margin-bottom: 5px;
}

.winner-item-time {
    font-size: 0.85em;
    color: #999;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .center-panel {
        order: -1;
    }
    
    .left-panel, .center-panel, .right-panel {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    .header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .main-content {
        gap: 15px;
        max-width: 100%;
    }
    
    .logo {
        max-width: 60px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    #wheelCanvas {
        width: 350px !important;
        height: 350px !important;
    }
    
    .wheel-container {
        padding: 20px 20px 30px 20px; /* Mobilde de üst boşluğu azalt */
    }
    
    /* Mobilde ok pozisyonunu ayarla */
    .arrow {
        top: 25px; /* Mobilde padding azaldığı için */
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-top: 40px solid #E07A5F;
    }
    
    .winner-content {
        padding: 40px 20px;
    }
    
    .winner-content h2 {
        font-size: 2.5em;
    }
    
    .winner-name {
        font-size: 2em;
    }
    
    .participants-list, .winners-history {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
        max-width: 100%;
    }
    
    .header {
        padding: 12px;
        border-radius: 12px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.3em;
    }
    
    .main-content {
        gap: 10px;
        max-width: 100%;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 25px;
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.05), rgba(224, 122, 95, 0.05));
    border-radius: 10px;
}

.footer p {
    color: white;
    font-weight: 600;
    font-size: 13px;
}


