/* Time Converter Tool Styles */

/* Tool Container - Full Page Layout */
.time-converter-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;
}

/* Converter Interface */
.converter-interface {
    margin-bottom: 3rem;
}

.converter-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    border: 1px solid #e5e7eb;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.time-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.time-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1.125rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.2s ease-in-out;
    text-align: center;
    font-weight: 500;
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(50, 146, 109, 0.1);
}

.clear-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.clear-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Unit Controls */
.unit-controls {
    margin-bottom: 2rem;
}

.unit-selectors {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.unit-group {
    display: flex;
    flex-direction: column;
}

.unit-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.unit-select {
    padding: 0.875rem;
    font-size: 0.9rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    font-weight: 500;
}

.unit-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(50, 146, 109, 0.1);
}

.swap-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.swap-btn:hover {
    transform: rotate(180deg) scale(1.05);
}

.convert-btn {
    width: 100%;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.convert-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

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

.convert-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.convert-btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

/* Result Section */
.result-section {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid #93c5fd;
}

.result-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#toTime {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease-in-out, opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toTime.loading {
    color: var(--text-light);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Conversion Info */
.conversion-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    transition: opacity 0.4s ease-in-out;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

.info-value {
    font-family: 'Courier New', monospace;
    color: #1d4ed8;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 1px solid #bae6fd;
    margin-bottom: 1.5rem;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid #e0f2fe;
    border-top: 4px solid #1d4ed8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #1d4ed8;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.025em;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.error-message i {
    color: #dc2626;
}

/* Popular Conversions */
.popular-conversions {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

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

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

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

.popular-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.popular-item:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.popular-pair {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.popular-result {
    font-family: 'Courier New', monospace;
    color: #1d4ed8;
    font-weight: 500;
    font-size: 0.9rem;
}

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

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

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

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

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

.related-tool-link {
    background: #f8fafc;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

/* SEO Content Styles */
.seo-content {
    max-width: 900px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

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

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

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

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

.seo-content ul, .seo-content ol {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

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

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

    .tool-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .unit-selectors {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .swap-btn {
        order: 3;
        justify-self: center;
        margin-top: 1rem;
        transform: rotate(90deg);
    }

    .swap-btn:hover {
        transform: rotate(270deg) scale(1.05);
    }

    .unit-select {
        font-size: 0.875rem;
        padding: 0.75rem;
    }

    #toTime {
        font-size: 2rem;
    }

    .popular-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .popular-item {
        padding: 0.75rem;
    }

    .popular-pair {
        font-size: 0.8rem;
    }

    .popular-result {
        font-size: 0.85rem;
    }

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

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

    .related-tool-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .seo-content {
        margin-top: 2rem;
        padding: 1.5rem;
    }

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

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

@media (max-width: 480px) {
    .tool-container {
        padding: 0.75rem;
    }

    .tool-header h1 {
        font-size: 1.5rem;
    }

    .converter-card {
        padding: 1rem;
    }

    .time-input {
        font-size: 1rem;
        padding: 0.875rem 2.5rem 0.875rem 0.875rem;
    }

    .unit-select {
        font-size: 0.8rem;
        padding: 0.625rem;
    }

    .convert-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    #toTime {
        font-size: 1.75rem;
    }

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

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

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

    .related-tool-link {
        padding: 0.75rem;
        font-size: 0.875rem;
        flex-direction: row;
        gap: 0.5rem;
    }

    .seo-content {
        padding: 1rem;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .spinner {
        border-width: 3px;
    }
}

/* Print Styles */
@media print {
    .time-converter-tool {
        background: white;
    }

    .converter-card, .popular-conversions, .seo-content {
        border: 1px solid #ccc;
    }

    .convert-btn, .swap-btn, .clear-btn {
        display: none;
    }

    .loading-indicator, .error-message {
        display: none;
    }
}
