/* Basic Reset and Global Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary-color: #0d6efd; --primary-hover: #0a58ca; --dark-color: #212529;
    --light-color: #f8f9fa; --text-color: #343a40; --background-color: #ffffff;
    --border-color: #dee2e6; --secondary-color: #6c757d;
    --heads-color: #f023f7; --tails-color: #5e3df2;
    --heads-text: 'HEADS'; --tails-text: 'TAILS';
    --heads-text-color: white; --tails-text-color: black;
}
body { font-family: 'Poppins', sans-serif; line-height: 1.7; color: var(--text-color); background-color: #f0f2f5; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header Styling (Unchanged) */
header { background: var(--background-color); box-shadow: 0 2px 5px rgba(0,0,0,0.07); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; }
header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.main-nav ul { list-style: none; display: flex; } .main-nav ul li { margin-left: 25px; }
.main-nav a { text-decoration: none; color: var(--dark-color); font-weight: 600; padding: 5px 10px; border-radius: 5px; transition: background-color 0.3s, color 0.3s; }
.main-nav a:hover, .main-nav a.active { background-color: var(--primary-color); color: white; }
.menu-toggle { display: none; cursor: pointer; }

/* Main Content Styling (Unchanged) */
main { padding: 50px 0; }
.tool-section { text-align: center; margin-bottom: 20px; }
h1 { font-size: 3rem; color: var(--dark-color); margin-bottom: 10px; }
.subtitle { font-size: 1.25rem; color: #6c757d; margin-bottom: 50px; }

/* The Coin Flip Tool */
.coin-flip-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%); padding: 50px;
    border-radius: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05), 0 15px 30px rgba(0,0,0,0.1);
    max-width: 600px; margin: 0 auto; perspective: 1200px; border: 1px solid #dfe4ea;
    position: relative; /* Needed for history icon positioning */
}
/* --- UPDATED & FIXED CSS COIN DESIGN --- */
.coin { 
    width: 200px; 
    height: 200px; 
    margin: 0 auto 30px; 
    position: relative; 
    transform-style: preserve-3d; 
    cursor: pointer; /* <-- YEH LINE ADD KAREIN */
}.coin-front, .coin-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 50%;
    border: 4px dotted white; box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 5px 10px rgba(0,0,0,0.2);
    display: flex; justify-content: center; align-items: center;
    background-size: cover; background-position: center; transition: background-color 0.3s;
}
.coin-front { background-color: var(--heads-color); transform: translateZ(1px); }
.coin-back { background-color: var(--tails-color); transform: rotateY(180deg) translateZ(1px); }
.coin-front::before, .coin-back::before {
    font-family: 'Poppins', sans-serif; font-weight: 900;
    font-size: 2rem; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px;
}
.coin-front::before { content: var(--heads-text); color: var(--heads-text-color); }
.coin-back::before { content: var(--tails-text); color: var(--tails-text-color); }
.has-image::before { display: none !important; }

/* Animations & States (Unchanged) */
.coin.heads { transform: rotateY(0deg); } .coin.tails { transform: rotateY(180deg); }
.coin.flipping-to-heads { animation: spin-zoom-to-heads 1.5s ease-out forwards; }
.coin.flipping-to-tails { animation: spin-zoom-to-tails 1.5s ease-out forwards; }
@keyframes spin-zoom-to-heads {
    0%   { transform: rotateY(0deg) scale(1); } 50%  { transform: rotateY(900deg) scale(1.2); }
    100% { transform: rotateY(1800deg) scale(1); }
}
@keyframes spin-zoom-to-tails {
    0%   { transform: rotateY(0deg) scale(1); } 50%  { transform: rotateY(990deg) scale(1.2); }
    100% { transform: rotateY(1980deg) scale(1); }
}

/* UI Elements */
#result-text { font-size: 1.75rem; font-weight: 700; color: var(--dark-color); min-height: 50px; margin-bottom: 10px; }
#game-status { font-size: 1rem; color: var(--secondary-color); min-height: 24px; margin-bottom: 15px; font-style: italic; }
.score-container { display: flex; justify-content: space-evenly; font-size: 1.25rem; margin: 25px auto; padding: 15px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); max-width: 350px; }
.score-container p { font-weight: 600; }
.score-container span { font-weight: 700; color: var(--primary-color); }
.game-mode-selector { margin-bottom: 25px; }
.game-mode-selector label { font-weight: 600; margin-right: 10px; }
.game-mode-selector select { padding: 5px 10px; border-radius: 5px; border: 1px solid var(--border-color); font-family: 'Poppins', sans-serif; font-size: 1rem; }
#flip-button { background: linear-gradient(45deg, var(--primary-color), var(--primary-hover)); color: white; border: none; padding: 18px 45px; font-size: 1.3rem; font-weight: 700; border-radius: 50px; cursor: pointer; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3); width: 90%; max-width: 350px; }
#flip-button:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 7px 20px rgba(13, 110, 253, 0.4); }
#flip-button:disabled { background: #adb5bd; cursor: not-allowed; box-shadow: none; transform: none; }
#reset-button { background: transparent; color: var(--secondary-color); border: 2px solid var(--border-color); padding: 10px 30px; font-size: 1rem; font-weight: 600; border-radius: 50px; cursor: pointer; transition: background-color 0.3s, color 0.3s; margin-top: 20px; }
#reset-button:hover { background-color: var(--secondary-color); color: white; }

/* --- NEW: History Box Styles --- */
#history-icon {
    position: absolute; top: 20px; right: 20px;
    width: 28px; height: 28px; cursor: pointer;
    color: var(--secondary-color); transition: color 0.3s;
}
#history-icon:hover { color: var(--primary-color); }
#history-box {
    display: none;
    position: absolute; top: 60px; right: 20px;
    width: 220px; max-height: 280px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 20; padding: 15px; text-align: left;
}
#history-box.visible { display: block; }
#history-box h4 { margin-bottom: 10px; color: var(--dark-color); border-bottom: 1px solid var(--border-color); padding-bottom: 5px; }
#history-box ol { list-style-position: inside; padding-left: 5px; margin: 0; max-height: 180px; overflow-y: auto; }
#history-box li { padding: 5px 0; border-bottom: 1px dashed #eee; font-size: 0.9rem; }
#history-box li:last-child { border-bottom: none; }
#reset-history-btn {
    width: 100%; margin-top: 15px; padding: 8px; font-size: 0.9rem;
    background-color: transparent; border: 1px solid #dc3545; color: #dc3545;
    border-radius: 20px; cursor: pointer; transition: all 0.3s;
}
#reset-history-btn:hover { background-color: #dc3545; color: white; }


/* Customization Section Styles (Unchanged) */
.customization-toggle-container { text-align: center; margin-bottom: 40px; }
#toggle-customization-btn { background-color: var(--secondary-color); color: white; border: none; padding: 10px 25px; font-size: 1rem; font-weight: 600; border-radius: 50px; cursor: pointer; transition: background-color 0.3s; }
#toggle-customization-btn:hover { background-color: var(--dark-color); }
#customization-section { display: none; max-width: 800px; margin: 0 auto; padding: 30px; background-color: var(--background-color); border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; }
#customization-section.visible { display: block; }
#customization-section h2 { margin-bottom: 25px; color: var(--dark-color); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
.settings-grid fieldset { border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; }
.settings-grid legend { font-weight: 600; padding: 0 10px; color: var(--primary-color); }
.setting-item { margin-bottom: 15px; display: flex; flex-direction: column; }
.setting-item label { font-weight: 600; margin-bottom: 5px; font-size: 0.9rem; }
.setting-item input[type="text"], .setting-item select { width: 100%; padding: 8px; border-radius: 5px; border: 1px solid var(--border-color); font-family: 'Poppins', sans-serif; }
.setting-item input[type="color"] { width: 100%; height: 40px; border: 1px solid var(--border-color); padding: 2px; border-radius: 5px; cursor: pointer; }
#reset-customization-btn { background-color: #dc3545; color: white; border: none; padding: 12px 30px; font-size: 1rem; font-weight: 600; border-radius: 50px; cursor: pointer; transition: background-color 0.3s; margin-top: 20px; }
#reset-customization-btn:hover { background-color: #c82333; }

/* Responsive (Unchanged) */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; } .subtitle { font-size: 1rem; } .main-nav { display: none; }
    .menu-toggle { display: block; } .coin-flip-container { padding: 30px 25px; }
    .coin { width: 150px; height: 150px; }
    #result-text { font-size: 1.5rem; } #flip-button { padding: 15px 35px; font-size: 1.1rem; }
    .settings-grid { grid-template-columns: 1fr; }
    #history-box { width: 180px; top: 55px; right: 15px; }
}
footer {
text-align: center;
padding: 20px 0;
margin-top: 40px;
color: #6c757d;
background-color: #f8f9fa; /* Light background color */

    
}
/* --- NEW: Content Section Styles --- */
.content-section {
    max-width: 800px; /* Limits the width for better readability */
    margin: 40px auto; /* Centers the section with space */
    padding: 30px;
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left; /* Aligns text to the left for paragraphs */
    line-height: 1.8; /* Increases line spacing for easier reading */
}

.content-section h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.content-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-section h4 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-top: 25px;
    margin-bottom: 10px;
}

.content-section p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.content-section strong {
    color: var(--dark-color);
    font-weight: 700;
}

.content-section ul {
    list-style-type: disc; /* Standard bullet points */
    padding-left: 25px; /* Indents the list */
    margin-bottom: 20px;
}

.content-section ul li {
    margin-bottom: 1px; /* Space between list items */
}

/* --- Add this inside the @media (max-width: 768px) block --- */
/* You will find this block at the end of your CSS file. 
   Just add these rules inside the existing curly braces {}. */

.content-section {
    padding: 20px;
}

.content-section h2 {
    font-size: 1.8rem;
}

.content-section h3 {
    font-size: 1.5rem;
}
/* =================================================== */
/*  STYLING FOR ALL CONTENT PAGES (ABOUT, CONTACT, ETC.) */
/* =================================================== */

/* Yeh container sabhi pages ke content ko ek card jaisa look dega */
.page-content {
    background: var(--background-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    max-width: 800px; /* Text ko readable rakhne ke liye */
    margin: 40px auto; /* Content box ko page ke center mein laane ke liye */
    text-align: left; /* Lambe text ke liye left alignment best hota hai */
}

/* Page ka mukhya title (H1) */
.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Page ke andar ke sub-headings (H2) */
.page-content h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Sabhi paragraphs ke liye spacing */
.page-content p {
    margin-bottom: 20px;
    line-height: 1.8; /* Padhne mein aasaani ke liye */
}

/* Lists ke liye (jaise bullets) */
.page-content ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.page-content ul li {
    margin-bottom: 10px;
}


/* =============================================== */
/*  STYLING SPECIFICALLY FOR THE CONTACT US PAGE   */
/* =============================================== */

/* Yeh style sirf contact form par apply hoga */
.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block; /* Label ko input field ke upar laane ke liye */
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-family: inherit; /* Website ka default font use karega */
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Jab user input field par click karega to effect */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-group textarea {
    resize: vertical; /* User message box ko sirf upar-neeche resize kar payega */
    min-height: 150px;
}

/* Form ka Submit Button */
.submit-btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.4);
}