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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

.header-with-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 15px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.icon-button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.icon-button i {
    font-size: 18px;
}

.icon-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Style for the delete button */
#clear-all-data {
    background-color: #e74c3c;
}

#clear-all-data:hover {
    background-color: #c0392b;
}

.site-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

h1 {
    text-align: center;
    color: #2c3e50;
}

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

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

.section-header h2 {
    margin-bottom: 0;
}

.section-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.section-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.toggle-icon {
    transition: transform 0.3s;
    font-size: 24px;
    font-weight: bold;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

.teams-list, .matches-list {
    margin-top: 15px;
}

.team-card, .match-card {
    background-color: #f9f9f9;
    border-left: 4px solid #3498db;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.team-header, .match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #c0392b;
}

.team-card h3, .match-card h3 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.team-players, .match-result {
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.player-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.player-item input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.player-item label {
    margin-bottom: 0;
    cursor: pointer;
    flex: 1;
}

.winner {
    font-weight: bold;
    color: #27ae60;
}

/* Fikstür Stilleri */
.fixture-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.action-button {
    background-color: #2ecc71;
}

.action-button:hover {
    background-color: #27ae60;
}

.cancel-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.cancel-button:hover {
    background-color: #c0392b;
}

.add-round-form, .add-match-form {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.round-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.round-actions button {
    font-size: 14px;
    padding: 5px 10px;
}

.fixture-container {
    margin-top: 20px;
}

.round {
    margin-bottom: 25px;
}

.round-title {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 5px;
}

.round-matches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fixture-match {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: calc(50% - 5px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fixture-match.played {
    border-left: 3px solid #2ecc71;
}

.fixture-match.pending {
    border-left: 3px solid #f39c12;
}

.fixture-match.bye-match {
    border-left: 3px solid #9b59b6;
    background-color: #f5eef8;
}

.fixture-teams {
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.fixture-result {
    font-size: 14px;
    color: #7f8c8d;
}

.fixture-date {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

.enter-score, .reset-score {
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    margin-top: 5px;
    display: inline-block;
}

.enter-score {
    background-color: #f39c12;
}

.enter-score:hover {
    background-color: #e67e22;
}

.reset-score {
    background-color: #e74c3c;
}

.reset-score:hover {
    background-color: #c0392b;
}

.match-actions {
    margin-top: 8px;
    display: flex;
    gap: 5px;
}

@media (max-width: 768px) {
    .fixture-match {
        width: 100%;
    }
    
    .container {
        padding: 10px;
    }
    
    table th, table td {
        padding: 8px;
        font-size: 12px;
    }
    
    /* Make rankings table responsive on mobile */
    #rankings-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Slightly reduce font size for table content */
    table {
        font-size: 14px;
    }
    
    /* Fix header layout on mobile */
    .header-with-logo {
        padding-top: 50px; /* Create space for header actions */
    }
    
    .header-actions {
        position: absolute; /* Not fixed, stays with the header */
        top: 0;
        right: 0;
        background-color: rgba(248, 249, 250, 0.9);
        padding: 5px;
        border-radius: 8px;
        z-index: 100;
    }
    
    .site-logo {
        width: 60px; /* Slightly smaller logo on mobile */
    }
    
    h1 {
        font-size: 24px; /* Smaller title on mobile */
    }
}

/* Veri Paylaşımı Stilleri */
.sharing-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.share-option {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.share-option h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.share-url-input {
    width: 100%;
    padding: 8px;
    background-color: #eee;
    cursor: pointer;
    font-size: 14px;
}

.share-url-input:focus {
    outline: 2px solid #4CAF50;
}

/* Footer Stillleri */
.footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
    width: 100%;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #2ecc71;
    text-decoration: underline;
}

/* Bildirim Sistemi Stilleri */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 320px;
    max-width: 90%;
}

.notification {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    animation: slide-in 0.3s ease-out;
    transition: all 0.3s ease;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.fade-out {
    animation: fade-out 0.3s ease-out forwards;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 16px;
}

.notification-message {
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: transparent;
    border: none;
    color: white;
    padding: 0;
    margin-left: 10px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    width: auto;
    height: 20px;
}

.notification-close:hover {
    opacity: 1;
    background: transparent;
}

.notification-error {
    background-color: #e74c3c;
    border-left: 5px solid #c0392b;
}

.notification-success {
    background-color: #2ecc71;
    border-left: 5px solid #27ae60;
}

.notification-warning {
    background-color: #f39c12;
    border-left: 5px solid #e67e22;
}

.notification-info {
    background-color: #3498db;
    border-left: 5px solid #2980b9;
}

/* Custom Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #7f8c8d;
    width: auto;
    padding: 0;
    margin: 0;
}

.modal-close:hover {
    color: #e74c3c;
    background: transparent;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.modal-btn-primary {
    background-color: #3498db;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #2980b9;
}

.modal-btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.modal-btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Score Input Form Styles */
.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.modal-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

input[type="number"].modal-input {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

/* Make the number inputs more user-friendly */
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Match score display styles */
.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.score-separator {
    margin: 0 8px;
    color: #95a5a6;
}

.winner-score {
    color: #27ae60;
}

.edit-score-btn {
    font-size: 14px;
    padding: 5px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 auto;
    display: block;
}

.edit-score-btn:hover {
    background-color: #2980b9;
}

/* Ranking table styles for first and second place */
.first-rank {
    background: linear-gradient(to right, rgba(255,215,0,0.2), rgba(255,215,0,0.3)) !important;
    font-weight: bold;
    border-left: 4px solid gold !important;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.15);
}

.first-rank td:first-child {
    position: relative;
}

.first-rank td:first-child::after {
    content: "🏆";
    font-size: 16px;
    margin-left: 5px;
    vertical-align: middle;
}

.first-rank:hover {
    background: linear-gradient(to right, rgba(255,215,0,0.3), rgba(255,215,0,0.4)) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.second-rank {
    background: linear-gradient(to right, rgba(192,192,192,0.2), rgba(192,192,192,0.3)) !important;
    font-weight: bold;
    border-left: 4px solid silver !important;
    box-shadow: 0 0 6px rgba(192, 192, 192, 0.2);
}

.second-rank td:first-child {
    position: relative;
}

.second-rank td:first-child::after {
    content: "🥈";
    font-size: 16px;
    margin-left: 5px;
    vertical-align: middle;
}

.second-rank:hover {
    background: linear-gradient(to right, rgba(192,192,192,0.3), rgba(192,192,192,0.4)) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Head-to-head indicator style */
.head-to-head-indicator {
    display: inline-block;
    background-color: #2c3e50;
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 5px;
    cursor: help;
}

/* Kura Çekimi Stillleri */
.draw-system {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.draw-result {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.draw-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.draw-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 200px;
    transition: all 0.5s ease;
}

.draw-team.winner {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.5);
    border: 2px solid #3498db;
}

.draw-team.loser {
    opacity: 0.7;
    filter: grayscale(0.8);
}

.team-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
}

.team-name {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.vs-indicator {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.winner-announcement {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1s ease-in-out;
}

.winner-crown {
    font-size: 48px;
    color: gold;
    margin-bottom: 10px;
    animation: sparkle 2s infinite alternate;
}

.winner-text {
    font-size: 20px;
    text-transform: uppercase;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.winner-name {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sparkle {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.draw-team.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.draw-team.bounce {
    animation: bounce 0.5s ease-in-out;
}

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

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f2f2f2;
    opacity: 0;
    transform: translateY(0) rotate(0);
    pointer-events: none;
}

@keyframes confettiFall {
    0% { 
        opacity: 1;
        transform: translateY(-50px) rotate(0);
    }
    100% {
        opacity: 0;
        transform: translateY(200px) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .draw-animation {
        flex-direction: column;
        gap: 20px;
    }
    
    .vs-indicator {
        margin: 10px 0;
    }
    
    .draw-team {
        width: 160px;
    }
} 