/* Data Size Converter Tool Styles */

/* Tool Container - Full Page Layout */
.data-size-converter-tool {
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
    margin: 0;
}

.tool-container {
    max-width: 1000px;
    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: var(--text-color);
    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 Interface */
.calculator-interface {
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

/* Standard Selection */
.standard-selection {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.standard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.standard-btn {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.standard-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.standard-btn.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
}

.standard-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.standard-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    transition: transform 0.2s ease;
}

.standard-btn:hover .standard-icon {
    transform: scale(1.1);
}

.standard-content span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.standard-btn.active .standard-content span {
    color: var(--primary-color);
}

.standard-content small {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
    transition: color 0.2s ease;
}

.standard-btn.active .standard-content small {
    color: rgba(59, 130, 246, 0.8);
}

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

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.formula-display {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-color);
    border-left: 4px solid var(--primary-color);
}

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

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

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip {
    position: relative;
    cursor: help;
    color: var(--primary-color);
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 200px;
    white-space: normal;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input,
.form-select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: white;
    flex: 1;
}

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

.form-input::placeholder {
    color: #9ca3af;
}

.example-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

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

.convert-btn,
.clear-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
    min-height: 44px;
}

.convert-btn {
    background: rgb(14, 134, 14);
    color: white;
}

.convert-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.clear-btn {
    background: #f3f4f6;
    color: var(--text-color);
    border: 2px solid #e5e7eb;
}

.clear-btn:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Messages */
.message-container {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-container.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message-container.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message-icon {
    font-size: 1.25rem;
}

/* Result Section */
.result-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.result-section.show {
    opacity: 1;
    transform: translateY(0);
}

.result-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #ef4444, #8b5cf6);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
    position: relative;
    z-index: 1;
}

.result-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.conversion-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.copy-result-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    min-height: 44px;
    min-width: 44px;
}

.copy-result-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Main Results */
.main-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.result-container {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

/* Colorful result containers */
.result-container:nth-child(1) {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.result-container:nth-child(2) {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #10b981;
}

.result-container:nth-child(3) {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.result-container:nth-child(4) {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #ef4444;
}

.result-container:nth-child(5) {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #8b5cf6;
}

.result-container:nth-child(6) {
    background: linear-gradient(135deg, #cffafe 0%, #a7f3d0 100%);
    border-color: #06b6d4;
}

.result-container:nth-child(7) {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #ec4899;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.result-unit {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Comparison Section */
.comparison-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.comparison-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

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

.comparison-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.comparison-standard {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.comparison-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.comparison-unit {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
}

/* Calculation Details */
.calculation-details {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.calculation-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.calculation-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calculation-step {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.875rem;
    color: var(--text-color);
}

.step-description {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-formula {
    font-family: 'Courier New', monospace;
    color: #6b7280;
}

/* Popular Examples */
.popular-examples {
    margin-bottom: 2rem;
}

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

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

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

.example-item {
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.example-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.example-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.example-item:hover::before {
    transform: scaleX(1);
}

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

.example-item:hover .example-icon {
    transform: scale(1.1);
}

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

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

/* 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 */
.seo-content {
    background: #f8fafc;
    padding: 3rem 0;
    margin-top: 3rem;
}

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

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

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

.content-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

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

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

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

.example-table {
    overflow-x: auto;
    margin: 1rem 0;
}

.example-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.example-table th,
.example-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.example-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: var(--text-color);
}

.example-table td {
    color: var(--text-color);
}

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

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

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

    .standard-btn {
        padding: 1rem;
        min-height: 60px;
    }

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

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

    .convert-btn,
    .clear-btn {
        width: 100%;
        max-width: 300px;
    }

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

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

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

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

    .example-item {
        min-height: 100px;
        padding: 1rem;
    }

    .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;
    }

    .copy-result-btn {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }

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

    .example-table {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.25rem;
    }

    .calculator-card {
        padding: 1rem;
    }

    .result-card {
        padding: 1rem;
    }

    .main-results {
        grid-template-columns: 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;
    }

    .tooltip:hover::after {
        max-width: 150px;
        font-size: 0.7rem;
    }
}
