/* ===== Time and Date Calculator App Styles ===== */
.timedate-app {
    max-width: 600px;
    margin: 0 auto;
    padding: 0.5rem;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
    overflow: hidden;
}

.timedate-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
}

/* Mode Selector */
.timedate-mode-selector {
    display: flex;
    gap: 0.25rem;
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.timedate-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.timedate-mode-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.15);
}

.timedate-mode-btn.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.timedate-mode-btn i {
    font-size: 0.85rem;
}

/* Sub-mode Selector */
.submode-selector {
    display: flex;
    gap: 0.25rem;
    background: rgba(139, 92, 246, 0.08);
    padding: 0.2rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

.submode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.3rem 0.4rem;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submode-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.12);
}

.submode-btn.active {
    background: rgba(139, 92, 246, 0.25);
    color: var(--primary-violet);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.submode-btn i {
    font-size: 0.7rem;
}

/* Submode Content */
.submode-content {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
}

.submode-content.active {
    display: flex;
}

/* Sections */
.timedate-section {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.timedate-section::-webkit-scrollbar {
    width: 6px;
}

.timedate-section::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 3px;
}

.timedate-section::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
}

.timedate-section::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

.timedate-section.active {
    display: flex;
}

/* Cards */
.timedate-card {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    transition: var(--transition);
}

.timedate-card:hover {
    border-color: var(--primary-violet);
}

.timedate-card h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.timedate-card h3 i {
    color: var(--primary-violet);
}

/* Time Input Group */
.time-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.time-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.time-field label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.time-field input {
    width: 55px;
    padding: 0.35rem;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.time-field input:focus {
    outline: none;
    border-color: var(--primary-violet);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.time-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.time-separator {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-violet);
    margin-top: 0.75rem;
}

/* Date Input */
.date-input-group {
    display: flex;
    justify-content: center;
}

.date-input {
    width: 100%;
    max-width: 220px;
    padding: 0.4rem 0.75rem;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-violet);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Duration Input Group (for Add mode) */
.duration-input-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.duration-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.duration-field label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.duration-field input {
    width: 55px;
    padding: 0.35rem;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.duration-field input:focus {
    outline: none;
    border-color: var(--primary-violet);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Arrow */
.timedate-arrow {
    display: flex;
    justify-content: center;
    padding: 0.15rem;
}

.timedate-arrow i {
    font-size: 1rem;
    color: var(--primary-violet);
    animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

/* Calculate Button */
.timedate-calculate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-main);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.4);
}

.timedate-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

.timedate-calculate-btn:active {
    transform: translateY(0);
}

/* Result */
.timedate-result {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.03) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

/* Main Result Box - Prominent display */
.result-main-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--primary-violet);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.result-header i {
    color: var(--primary-violet);
    font-size: 0.85rem;
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-breakdown {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.25rem 0.4rem;
    background: rgba(15, 15, 26, 0.4);
    border-radius: 5px;
    min-width: 50px;
}

.breakdown-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.breakdown-label {
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.result-detailed {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.result-detailed span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ===== About Section ===== */
.td-about-container {
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 8rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(139, 92, 246, 0.2);
}

.td-info-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.td-info-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.td-info-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.td-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.td-info-card {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition);
}

.td-info-card:hover {
    border-color: var(--primary-violet);
    transform: translateY(-2px);
}

.td-info-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    color: var(--primary-violet);
    font-size: 1rem;
}

.td-info-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.td-steps {
    list-style: decimal;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.td-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.td-features {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.td-features h4 {
    margin-top: 0;
}

.td-features ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.td-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.td-features li i {
    color: #22C55E;
    font-size: 0.85rem;
}

.td-faq {
    margin-top: 1.5rem;
}

.td-faq .faq-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.td-faq .faq-item:last-child {
    border-bottom: none;
}

.td-faq .faq-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.td-faq .faq-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ===== Light Theme ===== */
.timedate-app.light-theme {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
}

.timedate-app.light-theme .timedate-mode-selector {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.timedate-app.light-theme .timedate-mode-btn {
    color: #666;
}

.timedate-app.light-theme .timedate-mode-btn:hover {
    color: #1a1a2e;
    background: rgba(139, 92, 246, 0.1);
}

.timedate-app.light-theme .timedate-mode-btn.active {
    color: white;
}

.timedate-app.light-theme .submode-selector {
    background: rgba(139, 92, 246, 0.08);
}

.timedate-app.light-theme .submode-btn {
    color: #666;
}

.timedate-app.light-theme .submode-btn:hover {
    color: #1a1a2e;
    background: rgba(139, 92, 246, 0.1);
}

.timedate-app.light-theme .submode-btn.active {
    color: var(--primary-violet);
    background: rgba(139, 92, 246, 0.15);
}

.timedate-app.light-theme .timedate-card {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.timedate-app.light-theme .timedate-card h3 {
    color: #1a1a2e;
}

.timedate-app.light-theme .time-field input {
    background: #ffffff;
    border-color: #d0d0d0;
    color: #1a1a2e;
}

.timedate-app.light-theme .time-field label {
    color: #666;
}

.timedate-app.light-theme .duration-field input {
    background: #ffffff;
    border-color: #d0d0d0;
    color: #1a1a2e;
}

.timedate-app.light-theme .duration-field label {
    color: #666;
}

.timedate-app.light-theme .date-input {
    background: #ffffff;
    border-color: #d0d0d0;
    color: #1a1a2e;
}

.timedate-app.light-theme .date-input::-webkit-calendar-picker-indicator {
    filter: none;
}

.timedate-app.light-theme .timedate-result {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 100%);
    border-color: #e0e0e0;
}

.timedate-app.light-theme .result-main-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: var(--primary-violet);
}

.timedate-app.light-theme .result-header {
    color: #333;
}

.timedate-app.light-theme .breakdown-item {
    background: #ffffff;
}

.timedate-app.light-theme .breakdown-value {
    color: #1a1a2e;
}

.timedate-app.light-theme .breakdown-label {
    color: #666;
}

.timedate-app.light-theme .result-detailed span {
    color: #666;
}

.td-about-container.light-theme {
    background: #ffffff;
    border-color: #e0e0e0;
}

.td-about-container.light-theme h3 {
    color: #1a1a2e;
}

.td-about-container.light-theme p,
.td-about-container.light-theme li {
    color: #666;
}

.td-about-container.light-theme .td-faq .faq-item strong {
    color: #1a1a2e;
}

.td-about-container.light-theme .td-info-card {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.td-about-container.light-theme .td-features {
    background: rgba(139, 92, 246, 0.05);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .timedate-app {
        padding: 0.35rem;
    }

    .timedate-mode-btn {
        padding: 0.3rem 0.25rem;
        font-size: 0.75rem;
    }

    .timedate-mode-btn span {
        display: none;
    }

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

    .submode-btn {
        padding: 0.25rem 0.3rem;
        font-size: 0.65rem;
    }

    .time-input-group {
        gap: 0.15rem;
    }

    .time-field input {
        width: 45px;
        padding: 0.3rem;
        font-size: 1rem;
    }

    .time-separator {
        font-size: 0.9rem;
    }

    .duration-input-group {
        gap: 0.3rem;
    }

    .duration-field input {
        width: 48px;
        padding: 0.3rem;
        font-size: 0.85rem;
    }

    .result-value {
        font-size: 1.3rem;
    }

    .result-main-box {
        padding: 0.4rem 0.5rem;
        margin-bottom: 0.4rem;
    }

    .result-breakdown {
        gap: 0.35rem;
    }

    .breakdown-item {
        padding: 0.2rem 0.35rem;
        min-width: 45px;
    }

    .breakdown-value {
        font-size: 0.85rem;
    }

    .td-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== LANDSCAPE RESPONSIVE DESIGN ===== */

/* Large Tablets and Small Laptops in Landscape (1024px - 1200px) */
@media screen and (orientation: landscape) and (max-width: 1200px) {
    .timedate-app {
        max-width: 550px;
        height: calc(100vh - 150px);
        max-height: calc(100vh - 150px);
    }
    
    .td-about-container {
        margin-top: 6rem;
        padding: 1.25rem;
    }
    
    .td-info-section h3 {
        font-size: 1.3rem;
    }
}

/* Tablets in Landscape (768px - 1024px) */
@media screen and (orientation: landscape) and (max-width: 1024px) and (min-width: 768px) {
    .timedate-app {
        max-width: 480px;
        padding: 0.4rem;
        height: calc(100vh - 120px);
        max-height: calc(100vh - 120px);
    }
    
    .timedate-container {
        gap: 0.4rem;
    }
    
    .timedate-mode-selector {
        gap: 0.2rem;
        padding: 0.2rem;
        border-radius: 7px;
    }
    
    .timedate-mode-btn {
        gap: 0.25rem;
        padding: 0.35rem 0.4rem;
        font-size: 0.7rem;
        border-radius: 5px;
    }
    
    .timedate-mode-btn i {
        font-size: 0.75rem;
    }
    
    .submode-selector {
        gap: 0.2rem;
        padding: 0.15rem;
        border-radius: 5px;
        margin-bottom: 0.2rem;
    }
    
    .submode-btn {
        gap: 0.2rem;
        padding: 0.25rem 0.35rem;
        font-size: 0.6rem;
        border-radius: 4px;
    }
    
    .submode-btn i {
        font-size: 0.6rem;
    }
    
    .submode-content {
        gap: 0.3rem;
    }
    
    .timedate-section {
        gap: 0.3rem;
    }
    
    .timedate-card {
        padding: 0.4rem;
        border-radius: 7px;
    }
    
    .timedate-card h3 {
        gap: 0.35rem;
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .time-input-group {
        gap: 0.2rem;
    }
    
    .time-field label {
        font-size: 0.5rem;
    }
    
    .time-field input {
        width: 48px;
        padding: 0.3rem;
        font-size: 0.95rem;
        border-radius: 5px;
    }
    
    .time-separator {
        font-size: 0.9rem;
        margin-top: 0.6rem;
    }
    
    .date-input {
        max-width: 190px;
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    .duration-input-group {
        gap: 0.4rem;
    }
    
    .duration-field label {
        font-size: 0.5rem;
    }
    
    .duration-field input {
        width: 48px;
        padding: 0.3rem;
        font-size: 0.85rem;
        border-radius: 5px;
    }
    
    .timedate-arrow {
        padding: 0.1rem;
    }
    
    .timedate-arrow i {
        font-size: 0.85rem;
    }
    
    .timedate-calculate-btn {
        gap: 0.35rem;
        padding: 0.4rem 0.85rem;
        font-size: 0.7rem;
        border-radius: 5px;
    }
    
    .timedate-result {
        padding: 0.4rem;
        border-radius: 7px;
    }
    
    .result-main-box {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.4rem;
        border-radius: 7px;
    }
    
    .result-header {
        gap: 0.35rem;
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }
    
    .result-header i {
        font-size: 0.75rem;
    }
    
    .result-value {
        font-size: 1.35rem;
    }
    
    .result-breakdown {
        gap: 0.4rem;
    }
    
    .breakdown-item {
        gap: 0.05rem;
        padding: 0.2rem 0.35rem;
        border-radius: 4px;
        min-width: 45px;
    }
    
    .breakdown-value {
        font-size: 0.85rem;
    }
    
    .breakdown-label {
        font-size: 0.48rem;
    }
    
    .result-detailed {
        margin-top: 0.3rem;
        padding-top: 0.3rem;
    }
    
    .result-detailed span {
        font-size: 0.65rem;
    }
    
    /* About Section */
    .td-about-container {
        margin-top: 4rem;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .td-info-section h3 {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }
    
    .td-info-section p {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .td-info-section h4 {
        font-size: 0.95rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .td-info-grid {
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .td-info-card {
        padding: 0.875rem;
        border-radius: 10px;
    }
    
    .td-info-card h4 {
        font-size: 0.85rem;
        gap: 0.35rem;
    }
    
    .td-info-card p {
        font-size: 0.75rem;
    }
    
    .td-steps li {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }
    
    .td-features {
        padding: 1rem;
        border-radius: 10px;
        margin: 1rem 0;
    }
    
    .td-features ul {
        gap: 0.4rem;
    }
    
    .td-features li {
        font-size: 0.8rem;
        gap: 0.35rem;
    }
    
    .td-features li i {
        font-size: 0.7rem;
    }
    
    .td-faq {
        margin-top: 1rem;
    }
    
    .td-faq .faq-item {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .td-faq .faq-item strong {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }
    
    .td-faq .faq-item p {
        font-size: 0.75rem;
    }
}

/* Small Tablets / Large Phones in Landscape (600px - 768px) */
@media screen and (orientation: landscape) and (max-width: 768px) and (min-width: 480px) {
    .timedate-app {
        max-width: 400px;
        padding: 0.3rem;
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }
    
    .timedate-container {
        gap: 0.3rem;
    }
    
    .timedate-mode-selector {
        gap: 0.15rem;
        padding: 0.15rem;
        border-radius: 6px;
    }
    
    .timedate-mode-btn {
        gap: 0.2rem;
        padding: 0.25rem 0.3rem;
        font-size: 0.6rem;
        border-radius: 4px;
    }
    
    .timedate-mode-btn i {
        font-size: 0.65rem;
    }
    
    .submode-selector {
        gap: 0.15rem;
        padding: 0.12rem;
        border-radius: 4px;
        margin-bottom: 0.15rem;
    }
    
    .submode-btn {
        gap: 0.15rem;
        padding: 0.2rem 0.25rem;
        font-size: 0.5rem;
        border-radius: 3px;
    }
    
    .submode-btn i {
        font-size: 0.5rem;
    }
    
    .submode-content {
        gap: 0.2rem;
    }
    
    .timedate-section {
        gap: 0.2rem;
        padding-right: 3px;
    }
    
    .timedate-section::-webkit-scrollbar {
        width: 4px;
    }
    
    .timedate-card {
        padding: 0.3rem;
        border-radius: 6px;
    }
    
    .timedate-card h3 {
        gap: 0.25rem;
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }
    
    .timedate-card h3 i {
        font-size: 0.6rem;
    }
    
    .time-input-group {
        gap: 0.15rem;
    }
    
    .time-field label {
        font-size: 0.4rem;
    }
    
    .time-field input {
        width: 40px;
        padding: 0.2rem;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    
    .time-separator {
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .date-input-group {
        padding: 0.1rem 0;
    }
    
    .date-input {
        max-width: 160px;
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 4px;
    }
    
    .duration-input-group {
        gap: 0.3rem;
    }
    
    .duration-field label {
        font-size: 0.4rem;
    }
    
    .duration-field input {
        width: 40px;
        padding: 0.2rem;
        font-size: 0.7rem;
        border-radius: 4px;
    }
    
    .timedate-arrow {
        padding: 0.08rem;
    }
    
    .timedate-arrow i {
        font-size: 0.7rem;
    }
    
    .timedate-calculate-btn {
        gap: 0.25rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.55rem;
        border-radius: 4px;
    }
    
    .timedate-calculate-btn i {
        font-size: 0.55rem;
    }
    
    .timedate-result {
        padding: 0.3rem;
        border-radius: 6px;
    }
    
    .result-main-box {
        padding: 0.3rem 0.45rem;
        margin-bottom: 0.3rem;
        border-radius: 6px;
    }
    
    .result-header {
        gap: 0.25rem;
        font-size: 0.55rem;
        margin-bottom: 0.1rem;
    }
    
    .result-header i {
        font-size: 0.6rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
    
    .result-breakdown {
        gap: 0.3rem;
    }
    
    .breakdown-item {
        gap: 0.05rem;
        padding: 0.15rem 0.25rem;
        border-radius: 3px;
        min-width: 38px;
    }
    
    .breakdown-value {
        font-size: 0.7rem;
    }
    
    .breakdown-label {
        font-size: 0.4rem;
    }
    
    .result-detailed {
        margin-top: 0.2rem;
        padding-top: 0.2rem;
    }
    
    .result-detailed span {
        font-size: 0.5rem;
    }
    
    /* About Section */
    .td-about-container {
        margin-top: 2rem;
        padding: 0.75rem;
        border-radius: 10px;
    }
    
    .td-info-section h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .td-info-section p {
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    .td-info-section h4 {
        font-size: 0.8rem;
        margin-top: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .td-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin: 0.75rem 0;
    }
    
    .td-info-card {
        padding: 0.6rem;
        border-radius: 8px;
    }
    
    .td-info-card h4 {
        font-size: 0.7rem;
        gap: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .td-info-card h4 i {
        font-size: 0.65rem;
    }
    
    .td-info-card p {
        font-size: 0.6rem;
    }
    
    .td-steps {
        padding-left: 1rem;
    }
    
    .td-steps li {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
        line-height: 1.5;
    }
    
    .td-features {
        padding: 0.65rem;
        border-radius: 8px;
        margin: 0.75rem 0;
    }
    
    .td-features h4 {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .td-features ul {
        gap: 0.3rem;
    }
    
    .td-features li {
        font-size: 0.65rem;
        gap: 0.25rem;
    }
    
    .td-features li i {
        font-size: 0.55rem;
    }
    
    .td-faq {
        margin-top: 0.75rem;
    }
    
    .td-faq .faq-item {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .td-faq .faq-item strong {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    
    .td-faq .faq-item p {
        font-size: 0.6rem;
    }
}

/* Mobile Phones in Landscape (height < 500px) */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .timedate-app {
        max-width: 350px;
        padding: 0.2rem;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
    }
    
    .timedate-container {
        gap: 0.2rem;
    }
    
    .timedate-mode-selector {
        gap: 0.1rem;
        padding: 0.1rem;
        border-radius: 5px;
    }
    
    .timedate-mode-btn {
        gap: 0.15rem;
        padding: 0.2rem 0.25rem;
        font-size: 0.5rem;
        border-radius: 3px;
    }
    
    .timedate-mode-btn i {
        font-size: 0.55rem;
    }
    
    .submode-selector {
        gap: 0.1rem;
        padding: 0.1rem;
        border-radius: 3px;
        margin-bottom: 0.1rem;
    }
    
    .submode-btn {
        gap: 0.1rem;
        padding: 0.15rem 0.2rem;
        font-size: 0.4rem;
        border-radius: 2px;
    }
    
    .submode-btn i {
        font-size: 0.4rem;
    }
    
    .submode-content {
        gap: 0.15rem;
    }
    
    .timedate-section {
        gap: 0.15rem;
        padding-right: 2px;
    }
    
    .timedate-section::-webkit-scrollbar {
        width: 3px;
    }
    
    .timedate-card {
        padding: 0.2rem;
        border-radius: 5px;
    }
    
    .timedate-card h3 {
        gap: 0.2rem;
        font-size: 0.5rem;
        margin-bottom: 0.15rem;
    }
    
    .timedate-card h3 i {
        font-size: 0.5rem;
    }
    
    .time-input-group {
        gap: 0.1rem;
    }
    
    .time-field {
        gap: 0.05rem;
    }
    
    .time-field label {
        font-size: 0.35rem;
    }
    
    .time-field input {
        width: 32px;
        padding: 0.15rem;
        font-size: 0.7rem;
        border-radius: 3px;
    }
    
    .time-separator {
        font-size: 0.6rem;
        margin-top: 0.4rem;
    }
    
    .date-input {
        max-width: 130px;
        padding: 0.2rem 0.4rem;
        font-size: 0.55rem;
        border-radius: 3px;
    }
    
    .duration-input-group {
        gap: 0.2rem;
    }
    
    .duration-field label {
        font-size: 0.35rem;
    }
    
    .duration-field input {
        width: 34px;
        padding: 0.15rem;
        font-size: 0.6rem;
        border-radius: 3px;
    }
    
    .timedate-arrow {
        padding: 0.05rem;
    }
    
    .timedate-arrow i {
        font-size: 0.55rem;
    }
    
    .timedate-calculate-btn {
        gap: 0.2rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.45rem;
        border-radius: 3px;
    }
    
    .timedate-calculate-btn i {
        font-size: 0.45rem;
    }
    
    .timedate-result {
        padding: 0.2rem;
        border-radius: 5px;
    }
    
    .result-main-box {
        padding: 0.2rem 0.35rem;
        margin-bottom: 0.2rem;
        border-radius: 5px;
        border-width: 1.5px;
    }
    
    .result-header {
        gap: 0.2rem;
        font-size: 0.45rem;
        margin-bottom: 0.08rem;
    }
    
    .result-header i {
        font-size: 0.5rem;
    }
    
    .result-value {
        font-size: 0.9rem;
    }
    
    .result-breakdown {
        gap: 0.2rem;
    }
    
    .breakdown-item {
        gap: 0.03rem;
        padding: 0.1rem 0.2rem;
        border-radius: 2px;
        min-width: 32px;
    }
    
    .breakdown-value {
        font-size: 0.6rem;
    }
    
    .breakdown-label {
        font-size: 0.32rem;
    }
    
    .result-detailed {
        margin-top: 0.15rem;
        padding-top: 0.15rem;
    }
    
    .result-detailed span {
        font-size: 0.45rem;
    }
    
    /* About Section */
    .td-about-container {
        margin-top: 1.5rem;
        padding: 0.6rem;
        border-radius: 8px;
    }
    
    .td-info-section h3 {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .td-info-section p {
        font-size: 0.55rem;
        margin-bottom: 0.35rem;
        line-height: 1.4;
    }
    
    .td-info-section h4 {
        font-size: 0.65rem;
        margin-top: 0.5rem;
        margin-bottom: 0.3rem;
    }
    
    .td-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
        margin: 0.5rem 0;
    }
    
    .td-info-card {
        padding: 0.45rem;
        border-radius: 6px;
    }
    
    .td-info-card h4 {
        font-size: 0.55rem;
        gap: 0.2rem;
        margin-bottom: 0.2rem;
    }
    
    .td-info-card h4 i {
        font-size: 0.5rem;
    }
    
    .td-info-card p {
        font-size: 0.5rem;
        line-height: 1.3;
    }
    
    .td-steps {
        padding-left: 0.85rem;
    }
    
    .td-steps li {
        font-size: 0.55rem;
        margin-bottom: 0.2rem;
        line-height: 1.4;
    }
    
    .td-features {
        padding: 0.5rem;
        border-radius: 6px;
        margin: 0.5rem 0;
    }
    
    .td-features h4 {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
    }
    
    .td-features ul {
        gap: 0.25rem;
    }
    
    .td-features li {
        font-size: 0.55rem;
        gap: 0.2rem;
    }
    
    .td-features li i {
        font-size: 0.45rem;
    }
    
    .td-faq {
        margin-top: 0.5rem;
    }
    
    .td-faq .faq-item {
        margin-bottom: 0.4rem;
        padding-bottom: 0.4rem;
    }
    
    .td-faq .faq-item strong {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }
    
    .td-faq .faq-item p {
        font-size: 0.5rem;
    }
}

/* Very small mobile landscape (height < 400px) */
@media screen and (orientation: landscape) and (max-height: 400px) {
    .timedate-app {
        max-width: 300px;
        padding: 0.15rem;
        height: calc(100vh - 65px);
        max-height: calc(100vh - 65px);
    }
    
    .timedate-container {
        gap: 0.15rem;
    }
    
    .timedate-mode-btn {
        padding: 0.15rem 0.2rem;
        font-size: 0.45rem;
    }
    
    .timedate-mode-btn i {
        font-size: 0.5rem;
    }
    
    .submode-btn {
        padding: 0.1rem 0.15rem;
        font-size: 0.35rem;
    }
    
    .timedate-card {
        padding: 0.15rem;
    }
    
    .timedate-card h3 {
        font-size: 0.45rem;
        margin-bottom: 0.1rem;
    }
    
    .time-field input {
        width: 28px;
        padding: 0.1rem;
        font-size: 0.6rem;
    }
    
    .time-separator {
        font-size: 0.5rem;
    }
    
    .date-input {
        max-width: 110px;
        padding: 0.15rem 0.3rem;
        font-size: 0.5rem;
    }
    
    .duration-field input {
        width: 30px;
        padding: 0.1rem;
        font-size: 0.5rem;
    }
    
    .timedate-calculate-btn {
        padding: 0.15rem 0.4rem;
        font-size: 0.4rem;
    }
    
    .result-main-box {
        padding: 0.15rem 0.25rem;
    }
    
    .result-value {
        font-size: 0.75rem;
    }
    
    .breakdown-item {
        padding: 0.08rem 0.15rem;
        min-width: 26px;
    }
    
    .breakdown-value {
        font-size: 0.5rem;
    }
    
    .breakdown-label {
        font-size: 0.28rem;
    }
    
    .td-about-container {
        margin-top: 1rem;
        padding: 0.45rem;
    }
    
    .td-info-section h3 {
        font-size: 0.65rem;
    }
    
    .td-info-section p {
        font-size: 0.45rem;
    }
    
    .td-info-card {
        padding: 0.35rem;
    }
    
    .td-info-card h4 {
        font-size: 0.45rem;
    }
    
    .td-info-card p {
        font-size: 0.4rem;
    }
}
