/* styles.css */

/* CSS Değişkenleri */
:root {
    --primary-color: #4CAF50; /* Canlı Yeşil */
    --secondary-color: #ffffff; /* Beyaz */
    --accent-color: #FFC107; /* Amber */
    --background-color: #121212; /* Koyu Arka Plan */
    --header-bg: rgba(18, 18, 18, 0.95);
    --main-bg: rgba(20, 20, 20, 0.95);
    --scoreboard-bg: rgba(30, 30, 30, 0.95);
    --popup-bg: rgba(0, 0, 0, 0.85);
    --text-color: #ffffff;
    --instruction-color: #b3b3b3;
    --easteregg-bg: #FFC107;
    --easteregg-text: #000000;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --font-primary: 'Roboto', sans-serif;
    --font-accent: 'Pacifico', cursive;
    --christmas-green: #008000;
    --christmas-red: #FF0000;
    --christmas-gold: #FFD700;
    --light-yellow: #FFFF99;
    --decoration-animation-speed: 2s;
}

/* Genel Stiller */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    background-color: var(--header-bg);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#logo {
    height: 60px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

#logo:hover {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 20px var(--accent-color);
}

header h1 {
    margin: 8px 0 3px 0;
    font-size: 2em;
    color: var(--primary-color);
    font-family: var(--font-accent);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.instructions {
    margin: 3px 0;
    font-size: 1em;
    color: var(--instruction-color);
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#kofi-widget-container {
    position: fixed;      /* Sayfada sabitlenir */
    top: 10px;            /* Üstten 10 piksel boşluk bırakır */
    left: 10px;           /* Soldan 10 piksel boşluk bırakır */
    z-index: 1000;        /* Diğer öğelerin üzerinde görünmesini sağlar */
}

/* Widget'ın kendisini ayarlamak için isteğe bağlı stil */
#kofi-widget-container iframe {
    max-width: 100px;     /* Widget genişliğini ayarlayabilirsiniz */
    /* Diğer stil ayarları ekleyebilirsiniz */
}

/* Genel Stil Ayarları */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* IG Follow Butonu Stilleri */
.ig-follow-button {
    position: fixed;
    top: 80px; /* Sol üstten 80px aşağı */
    left: 20px; /* Sol kenardan 20px */
    background-color: #E1306C; /* Instagram renkleri */
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px; /* Metin ile ikon arasına boşluk ekler */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000; /* Diğer öğelerin üzerinde */
}

.ig-follow-button:hover {
    background-color: #c1275b;
    transform: translateY(-2px);
}

.ig-follow-button i {
    color: #ffdde1;
    font-size: 18px;
}

/* Responsive Tasarım için */
@media (max-width: 600px) {
    .ig-follow-button {
        padding: 8px 16px;
        font-size: 14px;
        top: 60px; /* Mobilde de butonu biraz daha aşağı taşı */
    }

    .ig-follow-button i {
        font-size: 16px;
    }
}


/* Online Mode Butonu */
.online-mode-btn {
    padding: 1.3em 3em;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 500;
    color: #000;
    background-color: #fff;
    border: none;
    border-radius: 45px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1),
    0px 0px 10px rgba(255, 255, 255, 0.8) inset;
    transition: all 0.3s ease 0s;
    cursor: pointer;
    outline: none;
    animation: blinkEdges 1.5s infinite;
}

@keyframes blinkEdges {
    0%, 100% {
        box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1),
        0px 0px 10px rgba(255, 255, 255, 0.2) inset;
    }
    50% {
        box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.8),
        0px 0px 15px rgba(255, 255, 255, 0.8) inset;
    }
}

.online-mode-btn:hover {
    background-color: #23c483;
    box-shadow: 0px 15px 20px rgba(46, 229, 157, 0.4);
    color: #fff;
    transform: translateY(-7px);
}

.online-mode-btn:active {
    transform: translateY(-1px);
}

/* Reklamlar */
.ad {
    position: fixed;
    padding: 8px;
    z-index: 900;
    border-radius: var(--border-radius);
    background: none;
    border: none;
    box-shadow: none;
}

.ad-left, .ad-right {
    top: 150px;
    width: 300px; /* Reklam genişliğini 300px olarak artırdık */
    min-width: 300px; /* Minimum genişlik ayarı */
    max-width: 300px; /* Maksimum genişlik ayarı */
}

.ad-left {
    left: 10px;
}

.ad-right {
    right: 10px;
}

.ad-bottom {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
}


/* Mobil ve Küçük Ekranlar için Reklamları Gizleme */
@media (max-width: 1600px) {
    .ad-left, .ad-right {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }
    main {
        left: 140px;
        right: 140px;
    }
}

@media (max-width: 1366px) {
    header h1 {
        font-size: 1.8em;
    }
    #logo {
        height: 50px;
    }
    .ad-left, .ad-right {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
}

@media (max-width: 1200px) {
    .ad-left, .ad-right {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
    }
    main {
        left: 120px;
        right: 120px;
    }
}

@media (max-width: 992px) {
    .ad-left, .ad-right {
        display: none; /* Daha küçük ekranlarda yan reklamları gizle */
    }
    main {
        left: 40px;
        right: 40px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }
    .instructions {
        font-size: 0.9em;
    }
    #scoreMessage {
        font-size: 2em;
    }
    #restartBtn {
        font-size: 0.9em;
        padding: 10px 20px;
    }
    #easterEgg {
        font-size: 1.1em;
        padding: 12px 22px;
    }
    main {
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }
    #logo {
        height: 40px;
    }
    #gameCanvas {
        border-width: 3px;
    }
}

/* Ana Oyun Alanı */
main {
    position: absolute;
    top: 130px; /* Header yüksekliğine göre ayarlandı */
    bottom: 50px;
    left: 160px;
    right: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--main-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 0 25px rgba(0,0,0,0.7);
    transition: all var(--transition-speed) ease;
    animation: fadeInMain 0.7s ease-out;
}

@keyframes fadeInMain {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#gameCanvas {
    background: #1e1e1e;
    border: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;
    cursor: crosshair;
    box-sizing: border-box;
    transition: border-color var(--transition-speed) ease;
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { border-color: var(--primary-color); }
    50% { border-color: var(--accent-color); }
    100% { border-color: var(--primary-color); }
}

#gameCanvas:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

/* Skor Panosu */
#scoreBoard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--scoreboard-bg);
    padding: 35px;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    text-align: center;
    z-index: 1001;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    animation: scaleUp 0.5s forwards;
}

@keyframes scaleUp {
    from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#scoreBoard.hidden {
    display: none;
}

#scoreMessage {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#restartBtn {
    padding: 12px 25px;
    font-size: 1em;
    background-color: var(--primary-color);
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), transform 0.2s, box-shadow var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

#restartBtn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

#restartBtn i {
    margin-right: 8px;
    transition: transform 0.3s;
}

#restartBtn:hover i {
    transform: rotate(360deg);
}

/* Popup Reklamlar */
#popupAd {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--popup-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    animation: fadeInPopup 0.5s ease;
}

@keyframes fadeInPopup {
    from { opacity: 0; }
    to { opacity: 1; }
}

#popupAd.hidden {
    display: none;
}

.popup-content {
    position: relative;
    background-color: rgba(33, 33, 33, 0.95); /* Koyu arka plan */
    padding: 30px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.popup-content .close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Eğitim Popup */
#trainingPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--popup-bg);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInPopup 0.5s ease;
}

#trainingPopup .popup-content {
    position: relative;
    background-color: rgba(33, 33, 33, 0.95); /* Koyu arka plan */
    padding: 30px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
    animation: scaleIn 0.5s ease;
}

#trainingPopup .popup-content p {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 20px;
}

.start-btn {
    padding: 12px 25px;
    font-size: 1em;
    background-color: var(--primary-color);
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), transform 0.2s, box-shadow var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.start-btn:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.start-btn i {
    transition: transform 0.3s;
}

.start-btn:hover i {
    transform: rotate(360deg);
}

#trainingPopup.hidden {
    display: none;
}

/* Easter Egg Mesajı */
#easterEgg {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--easteregg-bg);
    color: var(--easteregg-text);
    padding: 18px 28px;
    border-radius: var(--border-radius);
    font-weight: bold;
    font-size: 1.3em;
    z-index: 1003;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    opacity: 0;
    animation: fadeInOutEaster 5s forwards;
}

#easterEgg.hidden {
    display: none;
}

@keyframes fadeInOutEaster {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Animasyonlar */
@keyframes bounceIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Tasarım */
@media (max-width: 1600px) {
    /* Reklam genişliğini 250px'e düşürdük */
    .ad-left, .ad-right {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }
    main {
        left: 140px;
        right: 140px;
    }
}

@media (max-width: 1366px) {
    header h1 {
        font-size: 1.8em;
    }
    #logo {
        height: 50px;
    }
    /* Reklam genişliğini 200px'e düşürdük */
    .ad-left, .ad-right {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
}

@media (max-width: 1200px) {
    /* Reklam genişliğini 150px'e düşürdük */
    .ad-left, .ad-right {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
    }
    main {
        left: 120px;
        right: 120px;
    }
}

@media (max-width: 992px) {
    .ad-left, .ad-right {
        display: none; /* Daha küçük ekranlarda yan reklamları gizle */
    }
    main {
        left: 40px;
        right: 40px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }
    .instructions {
        font-size: 0.9em;
    }
    #scoreMessage {
        font-size: 2em;
    }
    #restartBtn {
        font-size: 0.9em;
        padding: 10px 20px;
    }
    #easterEgg {
        font-size: 1.1em;
        padding: 12px 22px;
    }
    main {
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }
    #logo {
        height: 40px;
    }
    #gameCanvas {
        border-width: 3px;
    }
}
