* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 700px;
    padding: 30px;
    text-align: center;
}

header {
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.timezone-info {
    color: #3498db;
    font-weight: 600;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* Ad Container Styling */
.ad-container {
    margin: 20px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
}

.ad-container:before {
    content: "Anúncio";
    display: block;
    font-size: 12px;
    color: #888;
    text-align: right;
    padding: 0 5px 5px 0;
}

.ad-placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.ad-placeholder.rectangle {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder.banner {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

.ad-placeholder:after {
    content: "Google AdSense";
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 10px;
    color: #888;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="date"]:focus {
    border-color: #3498db;
    outline: none;
}

button {
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.result-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.format-selector {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 8px;
}

.format-selector label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.age-display {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.age-unit {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: pulse 1s infinite;
}

.age-unit.full-width {
    min-width: 100%;
    margin: 10px 0;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.age-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.age-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hidden {
    display: none;
}

/* Famous Birthdays Section */
.famous-birthdays-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.famous-birthdays-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.famous-birthdays-section p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#celebrity-search {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

#search-button {
    width: auto;
    padding: 12px 20px;
}

.famous-birthdays-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.celebrity-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.2s;
}

.celebrity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.celebrity-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.celebrity-birthdate {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.celebrity-age {
    font-weight: 600;
    color: #3498db;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .age-unit {
        min-width: 70px;
        padding: 10px;
    }
    
    .age-number {
        font-size: 1.5rem;
    }
    
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .ad-container {
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .age-display {
        gap: 10px;
    }
    
    .age-unit {
        min-width: 60px;
        padding: 8px;
    }
    
    .age-number {
        font-size: 1.2rem;
    }
    
    .age-label {
        font-size: 0.8rem;
    }
    
    .famous-birthdays-list {
        grid-template-columns: 1fr;
    }
}