body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #cff7da;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.game-container {
    max-width: 448px; 
    width: 100%;
    padding: 1.5rem;
    background-color: rgba(158, 228, 161, 0.459);
    border-radius: 0.75rem;
    box-shadow: 0 10px 20px -5px rgba(4, 120, 87, 0.342), 0 4px 6px -2px rgba(4, 120, 87, 0.322);
}

/*Heading*/
.app-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: #05533c;
    margin-bottom: 1.5rem;
    letter-spacing: 0.25em;
}

/* Status D*/
.status-display {
    font-size: 1.5rem; 
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    height: 2rem;
    color: #059669;
}

/*resetgomb*/
.reset-btn {
    margin-top: 2rem;
    width: 100%;
    background-color: #047857;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease-in-out;
    border: none;
    cursor: pointer;
}
.reset-btn:hover {
    background-color: #065f46;
    transform: scale(1.01);
}


/*message*/
#modal-message {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #064e3b;
}

.mode-selector {
    display: flex;
    background-color: #2b5f3a;
    border-radius: 0.75rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem; /*gombok kozotti tavolsag*/
}

/*modal zarogomb*/
.modal-btn {
    flex-grow: 1;/*Egyenletesen tölti ki a rendelkezésre álló helyet*/
    padding: 0.5rem 1rem;
    font-weight: 600;/*felkover*/
    background-color: #10b981;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    color: #4a5568;
}
.mode-btn.active {
    background-color: rgb(118, 235, 118);
    color: #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/*jatektabla*/
.game-board {
    width: 350px;
    height: 350px;
    margin: 0 auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /*alapertelmezett 3x3*/
    grid-template-rows: repeat(3, 1fr);    
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #1ba851;
    transition: background-color 0.2s, transform 0.1s;
    user-select: none;
    color: #1a202c;
}

.board-3x3 .cell { font-size: 3.5rem; }
.board-5x5 .cell {font-size: 2rem; }

.cell:not(.filled):hover {
    background-color: #f0f4f8;
}

.winning-cell {
    background-color: #38a169 !important;
    color: white !important;
}

.cell.X { color: #3b793f; }
.cell.O { color: #109965fb; }
.cell.Z { color: #925e1f; }


/*madawl stilusok*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-out;
    max-width: 90%;
    width: 350px;
}

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

.hidden {
    display: none !important;
}


