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

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.container {
    background-color: white;
    padding: 10px;
    padding-top: 60px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 100%;
    position: relative;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    z-index: 20;
    padding: 8px 12px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.fixed-score {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.fixed-score .score-icon {
    font-size: 1.1em;
    animation: spin 4s linear infinite;
    display: inline-block;
}

.fixed-score .total-score {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.back-button:hover {
    background-color: #f0f0f0;
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    z-index: 10;
    padding: 40px 10px;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.total-score-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.total-score-display {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 4px 10px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.score-icon {
    font-size: 1.1em;
    animation: spin 4s linear infinite;
    display: inline-block;
}

.total-score {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

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

@keyframes spin {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.logo-img {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

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

.daily-challenge {
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    border-radius: 15px;
    padding: 16px;
    color: white;
    margin: 0 auto 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.15);
    transition: transform 0.3s ease;
}

.daily-challenge:hover {
    transform: translateY(-2px);
}

.daily-challenge h2 {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    font-weight: 700;
}

.trophy-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
}

.trophy-img {
    font-size: 36px;
    margin-right: 16px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.challenge-info {
    text-align: left;
    line-height: 1.4;
}

.stars {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 5px;
}

.date {
    opacity: 0.95;
    font-size: 1em;
}

.challenge-btn {
    background-color: white;
    color: #4361ee;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.challenge-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background-color: #f8f9fa;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mode-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #2d3b8e;
    margin-bottom: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.difficulty-btn {
    padding: 12px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 14px;
    background-color: white;
    color: #4361ee;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.difficulty-btn:hover {
    background-color: #4361ee;
    color: white;
    border-color: #4361ee;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #666;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0;
    background-color: #fff;
    border: 2px solid #333;
    margin-bottom: 20px;
}

.cell {
    background-color: white;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    user-select: none;
    border: 1px solid #ccc;
    transition: none;
}

.cell.given {
    color: #333;
}

.cell.selected {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    transition: none;
}

.cell:not(.given).selected {
    background-color: #bbdefb;
}

.cell.highlight {
    background-color: #f0f7ff;
    transition: none;
}

.cell.error {
    color: #d32f2f;
    animation: flashError 0.5s ease-in-out;
}

.cell.hint {
    color: #4CAF50;
}

.cell.same-number {
    background-color: #bbdefb;
    color: #333;
    transition: none;
}

/* Border for 3x3 boxes */
.cell:nth-child(3n) {
    border-right: 1px solid #ccc;
}

.cell:nth-child(9n) {
    border-right: 1px solid #ccc;
}

/* 3x3 box borders */
.cell:nth-child(3n):not(:nth-child(9n)) {
    border-right: 2px solid #333;
}

.game-board > :nth-child(n+19):nth-child(-n+27),
.game-board > :nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #333;
}

.controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.control-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.control-btn:hover {
    background-color: #e0e0e0;
}

.control-btn.active {
    background-color: #2196f3;
    color: white;
}

.control-btn.active:hover {
    background-color: #1976d2;
}

.control-btn .icon {
    font-size: 1.2em;
    margin-bottom: 4px;
}

.hint-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cell.hint {
    color: #4CAF50;
}

.cell.same-number {
    background-color: #bbdefb;
    color: #333;
    transition: none;
}

.controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.notes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    font-size: 0.4em;
    gap: 1px;
}

.note {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
}

.challenge-calendar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1001;
    padding: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    text-align: center;
}

.calendar-header h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

.calendar-banner {
    background: linear-gradient(135deg, #4a6cf7, #2d3b8e);
    border-radius: 15px;
    padding: 20px;
    color: white;
    margin: 0 10px 20px 10px;
    text-align: center;
}

.banner-trophy {
    font-size: 40px;
    margin-bottom: 10px;
}

.month-year {
    font-size: 1.5em;
    font-weight: bold;
    margin: 10px 0;
}

.progress {
    font-size: 1.2em;
    opacity: 0.9;
}

.daily-difficulty-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.daily-difficulty-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.daily-difficulty-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.daily-difficulty-btn.selected {
    background-color: white;
    color: #4a6cf7;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 500;
    padding: 0 10px;
    color: #666;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 10px;
    margin-bottom: 20px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    font-size: 1.1em;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
}

.calendar-day.inactive {
    color: #ccc;
}

.calendar-day.clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calendar-day.clickable:hover {
    transform: scale(1.1);
    background-color: #f0f7ff;
}

.calendar-day.clickable.completed:hover {
    background-color: #3a5cd6;
}

.calendar-day.completed {
    background-color: #4a6cf7;
    color: white;
}

.calendar-day.in-progress {
    border: 2px solid #4a6cf7;
    color: #4a6cf7;
}

.calendar-day.today:not(.completed) {
    background-color: #e8eef7;
    font-weight: bold;
}

.calendar-day.completed {
    background-color: #4a6cf7;
    color: white;
}

.calendar-day.in-progress {
    border: 2px solid #4a6cf7;
    color: #4a6cf7;
}

.calendar-day.today {
    background-color: #e8eef7;
    font-weight: bold;
}

.challenge-status {
    text-align: center;
    padding: 20px;
    background: #f5f7fa;
    margin: 0 10px 10px;
    border-radius: 10px;
}

/* Oyun tahtasını ve kontrolleri gizle */
.game-board,
.controls,
.number-pad,
.game-header {
    display: none;
}

/* Mobil için takvim düzenlemeleri */
@media (max-width: 480px) {
    .calendar-grid {
        gap: 2px;
        padding: 5px 10px;
    }
    
    .calendar-day {
        font-size: 0.9em;
        padding: 5px;
    }
    
    .weekdays {
        font-size: 0.8em;
    }
    
    .month-year {
        font-size: 1.3em;
    }
    
    .calendar-banner {
        padding: 15px;
        margin: 0 10px 15px 10px;
    }
}

.status-text {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.continue-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.continue-btn:hover {
    background-color: #2d3b8e;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
}

.number {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 12px 0;
    font-size: 1.8em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.number.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.number.disabled:hover {
    background-color: #ccc;
}

.number:hover {
    background-color: #1976d2;
}

.popup {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    max-width: 90%;
    width: 360px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.score-details {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.score-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #dee2e6;
}

.score-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    color: #4a6cf7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #495057;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    transition: transform 0.2s;
}

.score-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.8);
}

.streak-bonus {
    color: #2d3b8e;
    font-weight: 600;
    background: rgba(74, 108, 247, 0.1);
}

.popup h2 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 24px;
}

.popup p {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.popup-button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-button.primary {
    background-color: #4a6cf7;
    color: white;
}

.popup-button.secondary {
    background-color: #e8eef7;
    color: #4a6cf7;
}

.popup-button:hover {
    transform: translateY(-2px);
}

.popup-button.primary:hover {
    background-color: #2d3b8e;
}

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

@keyframes flashError {
    0%, 100% {
        background-color: white;
    }
    50% {
        background-color: #ff6b6b;
    }
}

@keyframes flashMistakes {
    0%, 100% {
        color: #666;
    }
    50% {
        color: #ff0000;
    }
}