/* General container for the calculator */
#adsense-calculator-container {
    max-width: 1100px; /* Desktop width */
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    color: #34495e;
    text-align: center;
    box-sizing: border-box;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.description {
    font-size: 1.1rem;
    color: #607d8b;
    margin-bottom: 2rem;
}

/* Input Selectors Grid */
.input-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 2rem;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 1rem;
    color: #34495e;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fcfcfc;
    -webkit-appearance: none; /* Remove default arrow */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23607d8b%22%20d%3D%22M287%2C197.3L159.9%2C69.8c-4.8-4.8-12.5-4.8-17.3%2C0L5.4%2C197.3c-4.8%2C4.8-4.8%2C12.5%2C0%2C17.3s12.5%2C4.8%2C17.3%2C0l130.8-130.8l130.8%2C130.8c4.8%2C4.8%2C12.5%2C4.8%2C17.3%2C0C291.8%2C209.8%2C291.8%2C202.1%2C287%2C197.3z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px; /* Space for the custom arrow */
}

.input-group select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Slider Specific Styling */
.slider-group {
    margin-bottom: 2.5rem;
    text-align: left; /* Align label left */
}

.slider-group input[type="range"] {
    width: calc(100% - 10px); /* Adjust for thumb overflow */
    -webkit-appearance: none; /* Remove default styling */
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #2ecc71 0%, #2ecc71 var(--range-progress, 0%), #e0e0e0 var(--range-progress, 0%), #e0e0e0 100%); /* Green progress bar */
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity .2s;
    margin-top: 10px;
    margin-bottom: 10px;
}

.slider-group input[type="range"]:hover {
    opacity: 1;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #3498db; /* Blue thumb */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff; /* White border for thumb */
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #3498db; /* Blue thumb */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff; /* White border for thumb */
}

.range-value {
    display: block;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: 5px;
}

/* Message Display */
.message-display {
    padding: 12px 20px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background-color: #f0f8ff; /* Light blue background */
    border: 1px solid #a7d9f7;
    color: #3498db;
    transition: all 0.3s ease;
}

/* Country Tier List Tabs */
.country-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.country-tab-button {
    background-color: transparent;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    border-bottom: 3px solid transparent;
    margin: 0 5px;
    border-radius: 8px 8px 0 0;
}

.country-tab-button:hover {
    color: #3498db;
}

.country-tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: #f8f8f8;
}

/* Country List Content */
.country-list-content {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 2rem;
    text-align: left;
    max-height: 300px; /* Limit height for scroll */
    overflow-y: auto;
}

.country-list-content h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.country-list-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}


/* Results Section */
.results-section {
    background-color: #ecf0f1; /* Light gray background */
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-section h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.revenue-display {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.revenue-item {
    flex: 1;
    min-width: 250px; /* Minimum width for each revenue box */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.revenue-label {
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.revenue-value {
    font-weight: 800;
    font-size: 2.5rem; /* Large font for revenue */
    line-height: 1.1;
}

.adsense-color {
    color: #2ecc71; /* Green for AdSense */
}

.header-bidding-color {
    color: #3498db; /* Blue for Header Bidding */
}

/* Action Links/Buttons */
.action-links {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column; /* Stack by default */
    align-items: center;
    gap: 15px;
}

.action-link {
    color: #3498db;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.action-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.action-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.action-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.disclaimer {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 2.5rem;
    line-height: 1.4;
}

/* Utility class for hiding elements */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 1150px) { /* Adjust for container max-width + padding */
    #adsense-calculator-container {
        margin: 1.5rem;
    }
}

@media (max-width: 768px) {
    #adsense-calculator-container {
        padding: 1.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    .description {
        font-size: 1rem;
    }
    .input-selectors {
        grid-template-columns: 1fr; /* Stack inputs on smaller screens */
        gap: 15px;
    }
    .country-tabs {
        flex-wrap: wrap; /* Allow tabs to wrap */
    }
    .country-tab-button {
        padding: 12px 18px;
        font-size: 0.95rem;
        margin: 5px; /* Add margin for wrapped buttons */
    }
    .revenue-display {
        flex-direction: column; /* Stack revenue items */
    }
    .revenue-item {
        min-width: unset; /* Remove min-width when stacked */
        width: 100%;
    }
    .revenue-value {
        font-size: 2rem;
    }
    .action-links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    #adsense-calculator-container {
        padding: 1rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .description {
        font-size: 0.9rem;
    }
    .country-tab-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .country-list-content {
        padding: 15px 20px;
    }
    .country-list-content h3 {
        font-size: 1.3rem;
    }
    .country-list-content p {
        font-size: 0.85rem;
    }
    .revenue-value {
        font-size: 1.8rem;
    }
    .action-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
}
