/* Age Calculator Tool Styles */

/* Tool Container - Full Page Layout */
.age-calculator-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 0;
    margin: 0;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h1 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.calculator-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Date Input Section */
.date-input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.date-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.date-row:last-child {
    border-bottom: none;
}

.date-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
    text-align: right;
}

.date-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.date-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.date-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-select:hover {
    border-color: var(--primary-color);
}

.date-select option {
    padding: 0.5rem;
}

.date-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
    min-width: 80px;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-input:hover {
    border-color: var(--primary-color);
}

.date-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.year-input {
    width: 80px;
    text-align: center;
}

.date-input:invalid {
    border-color: #ef4444;
}

.date-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.calendar-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.calendar-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.calendar-btn i {
    font-size: 1rem;
}

/* Calendar Popup */
.calendar-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 320px;
    max-width: 90vw;
    border: 1px solid #e5e7eb;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.calendar-nav-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.calendar-nav-btn:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-month-year {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calendar-month-select,
.calendar-year-select {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.calendar-month-select:focus,
.calendar-year-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f3f4f6;
    padding: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.5rem 0;
    background: white;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f3f4f6;
    padding: 0 0.5rem 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 1px;
}

.calendar-day:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.calendar-day.today {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.selected {
    background: #1d4ed8;
    color: white;
    font-weight: 600;
}

.calendar-day.other-month {
    color: #d1d5db;
    background: #f9fafb;
}

.calendar-day.disabled {
    color: #d1d5db;
    background: #f9fafb;
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: #f9fafb;
    color: #d1d5db;
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
}

.calendar-today-btn,
.calendar-close-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-today-btn {
    background: var(--primary-color);
    color: white;
}

.calendar-today-btn:hover {
    background: #1d4ed8;
}

.calendar-close-btn {
    background: #f3f4f6;
    color: var(--text-dark);
}

.calendar-close-btn:hover {
    background: #e5e7eb;
}

/* Calendar Overlay */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
}

/* Action Controls */
.action-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.calculate-btn,
.clear-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.calculate-btn {
    background: rgb(28, 40, 214);
    color: white;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.clear-btn {
    background: #f3f4f6;
    color: var(--text-dark);
}

.clear-btn:hover {
    background: #e5e7eb;
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Section - New Design */
.result-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Result Hero Card */
.result-hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.result-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.result-hero-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.result-hero-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.result-hero-text {
    flex: 1;
}

.result-hero-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    opacity: 0.9;
}

.result-hero-age {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.copy-result-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.copy-result-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.copy-result-btn span {
    display: none;
}

/* Quick Stats Grid */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-stat-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.quick-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.quick-stat-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    border-radius: 10px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
    font-size: 1.25rem;
}

.quick-stat-content {
    flex: 1;
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.quick-stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Result Cards */
.result-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.result-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-card-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-card-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.result-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.result-card-content {
    padding: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Individual Card Color Variations */
.result-card:nth-child(1) .result-card-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.result-card:nth-child(1) .result-card-header {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.result-card:nth-child(2) .result-card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.result-card:nth-child(2) .result-card-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.result-card:nth-child(3) .result-card-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.result-card:nth-child(3) .result-card-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.result-card:nth-child(4) .result-card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.result-card:nth-child(4) .result-card-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* Popular Examples */
.popular-examples {
    margin-top: 3rem;
    padding: 2rem 0;
}

.popular-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-title i {
    color: #fbbf24;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.example-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-item:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.example-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.example-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.example-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: var(--primary-color);
}

.related-tools-header p {
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* SEO Content Styles */
.seo-content {
    background: white;
    margin-top: 3rem;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.seo-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: var(--text-dark);
    font-weight: 600;
}

.seo-content section {
    margin-bottom: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .date-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .date-label {
        text-align: left;
        min-width: auto;
        font-size: 0.875rem;
    }

    .date-selectors {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .date-select {
        min-width: 70px;
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .date-input {
        min-width: 70px;
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .year-input {
        width: 70px;
    }

    .calendar-btn {
        width: 40px;
        height: 40px;
        padding: 0.625rem;
    }

    .action-controls {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .calculate-btn,
    .clear-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }

    /* Result Section Mobile */
    .result-hero {
        padding: 1.5rem;
    }

    .result-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .result-hero-main {
        flex-direction: column;
        gap: 1rem;
    }

    .result-hero-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .result-hero-age {
        font-size: 1.75rem;
    }

    .copy-result-btn span {
        display: inline;
    }

    .quick-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .quick-stat-item {
        padding: 1rem;
    }

    .quick-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .quick-stat-value {
        font-size: 1.25rem;
    }

    .result-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .result-card-header {
        padding: 0.75rem 1rem;
    }

    .result-card-content {
        padding: 1rem;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .content-container {
        padding: 0 1rem;
    }

    .seo-content h2 {
        font-size: 1.375rem;
    }

    .seo-content h3 {
        font-size: 1.125rem;
    }

    .related-tools-section {
        padding: 1.5rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
    }

    .related-tool-link i {
        font-size: 1.1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .date-selectors {
        gap: 0.375rem;
    }

    .date-select {
        min-width: 60px;
        padding: 0.5rem;
        font-size: 0.8125rem;
    }

    .date-input {
        min-width: 60px;
        padding: 0.5rem;
        font-size: 0.8125rem;
    }

    .year-input {
        width: 60px;
    }

    .calendar-btn {
        width: 36px;
        height: 36px;
        padding: 0.5rem;
    }

    .calendar-btn i {
        font-size: 0.875rem;
    }

    /* Calendar Mobile Styles */
    .calendar-popup {
        width: 300px;
        max-width: 95vw;
    }

    .calendar-header {
        padding: 0.75rem;
    }

    .calendar-month-select,
    .calendar-year-select {
        font-size: 0.8125rem;
        padding: 0.375rem;
    }

    .calendar-weekdays,
    .calendar-days {
        padding: 0.375rem;
    }

    .calendar-day {
        font-size: 0.8125rem;
    }

    .calendar-footer {
        padding: 0.75rem;
    }

    .calendar-today-btn,
    .calendar-close-btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    .summary-value {
        font-size: 1.125rem;
    }

    .calculate-btn,
    .clear-btn {
        max-width: none;
        font-size: 0.9375rem;
        min-height: 52px;
    }

    .result-hero {
        padding: 1rem;
    }

    .result-hero-age {
        font-size: 1.5rem;
    }

    .quick-stat-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .quick-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .quick-stat-value {
        font-size: 1.125rem;
    }

    .result-card-header {
        padding: 0.625rem 0.75rem;
    }

    .result-card-content {
        padding: 0.75rem;
    }

    .result-card-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .result-card-title {
        font-size: 0.9375rem;
    }

    .related-tools-section {
        padding: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-link {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        text-align: left;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .mode-tab:hover,
    .calculate-btn:hover,
    .clear-btn:hover,
    .example-item:hover,
    .copy-result-btn:hover {
        transform: none;
    }

    .mode-tab:active {
        transform: scale(0.98);
    }

    .calculate-btn:active,
    .clear-btn:active {
        transform: scale(0.98);
    }

    .example-item:active {
        transform: scale(0.98);
    }
}
