* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    position: relative;
    width: 100vw;
    left: calc(-50vw + 50%);
    text-align: left;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 100%);
    color: white;
    padding: 20px;
    margin-bottom: 40px;
    margin-top: -20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

.tool-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ff7b00;
}

.tool-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

input[type="date"], 
input[type="month"], 
select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="date"]:focus, 
input[type="month"]:focus, 
select:focus {
    outline: none;
    border-color: #ff7b00;
}

button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff7b00 0%, #8b4513 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.3);
}

.result {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    font-weight: 500;
    color: #333;
    min-height: 20px;
}

.extra-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tool-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tool-item h3 {
    margin-bottom: 15px;
    color: #495057;
}

.tool-item .input-group {
    flex-direction: column;
    align-items: stretch;
}

.tool-item input,
.tool-item select,
.tool-item button {
    margin-bottom: 10px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.calendar-header {
    background: #ff7b00;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 4px;
}

.calendar-day {
    background: white;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-weight: 500;
    margin-bottom: 2px;
}

.moon-icon-small {
    font-size: 0.8rem;
    line-height: 1;
}

.calendar-day.other-month {
    color: #ccc;
    background-color: #f8f9fa;
}

.calendar-day.today {
    background: #ff7b00;
    color: white;
    font-weight: bold;
}

.calendar-week-number {
    background: #8b4513;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 4px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-options {
    margin-bottom: 20px;
}

.moon-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
}

.moon-options input[type="radio"] {
    margin-right: 8px;
}

.moon-phases {
    margin-top: 15px;
}

.moon-phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.moon-phase-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.moon-phase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #ff7b00;
}

.moon-phase-card.main-phase {
    border-color: #ff7b00;
    background: linear-gradient(135deg, #fff7f0 0%, #ffffff 100%);
}

.moon-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.moon-phase-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.moon-phase-date {
    color: #666;
    font-size: 0.9rem;
}

.moon-phases-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.moon-day-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    min-width: 80px;
    transition: background-color 0.2s;
}

.moon-day-item:hover {
    background-color: #f8f9fa;
}

.moon-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.moon-day-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
    display: block;
}

.moon-day-phase {
    font-size: 0.7rem;
    color: #666;
}

.ad-section {
    margin: 30px 0;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.ad-section .adsbygoogle {
    min-height: 50px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
}

footer {
    position: relative;
    width: 100vw;
    left: calc(-50vw + 50%);
    margin-top: 50px;
    margin-bottom: -20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: white;
    text-align: right;
}

.footer-content {
    font-size: 0.85rem;
}

.footer-content p {
    margin: 0;
    display: inline;
}

.footer-content p:not(:last-child)::after {
    content: " | ";
    margin: 0 8px;
}

.footer-content a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.footer-content a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .extra-tools {
        grid-template-columns: 1fr;
    }
    
    .moon-phases-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .moon-phases-list {
        justify-content: center;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 15px;
    }
    
    footer {
        margin-top: 30px;
        padding: 20px;
    }
    
    .footer-content p {
        font-size: 0.9rem;
    }
    
    /* Calendário mobile */
    .calendar {
        gap: 1px;
        padding: 8px;
    }
    
    .calendar-header {
        padding: 6px 2px;
        font-size: 0.75rem;
        min-height: 30px;
    }
    
    .calendar-day {
        padding: 4px 2px;
        font-size: 0.8rem;
        min-height: 30px;
    }
    
    .calendar-week-number {
        padding: 4px 2px;
        font-size: 0.7rem;
        min-height: 30px;
    }
}