:root {
    --primary: #1ba4c8;
    --primary-dark: #1892B2;
    --secondary: #1892B2;
    --light-bg: #F8FCFF;
    --border: #e1e5f1;
    --text: #333;
    --text-light: #666;
    --danger: #ff6b6b;
    --success: #00C485;
    --warning: #ffd166;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Main Container */
.tool-container {
    margin: 15px auto;
    background: white;
    border-radius: 6px;
    padding: 0;
/*    overflow: hidden;
    box-shadow: var(--shadow);*/
}

/* Two Column Layout */
.tool-content {
    display: flex;
}

/* Left Panel - Form */
.tool-left-panel {
    flex: 0 0 380px;
    padding: 10px;
    background: white;
}

/* Right Panel - Results */
.tool-right-panel {
    flex: 1;
    padding: 10px;
    background: white;
}

/* Section Styling - Compact */
.tool-section {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.tool-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-section-title i {
    color: var(--primary);
    font-size: 14px;
}

/* Form Section Styling */
.tool-form-section {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

/* Original Section - Light Blue Background */
.tool-original-section {
    background: linear-gradient(135deg, rgba(27, 164, 200, 0.03) 0%, rgba(27, 164, 200, 0.06) 100%);
    border-color: rgba(27, 164, 200, 0.2);
    position: relative;
}

.tool-original-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 4px 0 0 4px;
}

/* New Section - Light Green Background */
.tool-new-section {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.03) 0%, rgba(6, 214, 160, 0.06) 100%);
    border-color: rgba(6, 214, 160, 0.2);
    position: relative;
}

.tool-new-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--success);
    border-radius: 4px 0 0 4px;
}

/* Section Subtitle */
.tool-section-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.tool-original-section .tool-section-subtitle i {
    color: var(--primary);
}

.tool-new-section .tool-section-subtitle i {
    color: var(--success);
}

/* Form Controls - Compact */
.tool-form-group {
    margin-bottom: 15px;
}

.tool-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
    font-size: 13px;
}

.tool-form-group label i {
    color: var(--primary);
    font-size: 13px;
    width: 16px;
}

.tool-input-group {
    position: relative;
}

.tool-input {
    width: 100%;
    padding: 9px 40px 9px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    box-sizing: border-box;
    color: var(--text);
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 164, 200, 0.1);
}

.tool-input::placeholder {
    color: #999;
}

.tool-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 12px;
    pointer-events: none;
    font-weight: 500;
}

/* Different background for inputs in each section */
.tool-original-section .tool-input {
    background: rgba(255, 255, 255, 0.9);
}

.tool-new-section .tool-input {
    background: rgba(255, 255, 255, 0.9);
}

/* Focus states with matching colors */
.tool-original-section .tool-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 164, 200, 0.15);
}

.tool-new-section .tool-input:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.15);
}

/* Checkbox */
.tool-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    margin-top: 5px;
    user-select: none;
}

.tool-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    background: white;
    transition: all 0.2s;
}

.tool-checkbox-label:hover .tool-checkbox {
    border-color: var(--primary);
}

.tool-checkbox-label input {
    display: none;
}

.tool-checkbox-label input:checked + .tool-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.tool-checkbox-label input:checked + .tool-checkbox:after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Select dropdown */
.tool-input[type="select"],
.tool-input select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.25L2.25 4.5l.707-.707L6 6.836l3.043-3.043.707.707z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

/* Buttons - Compact */
.tool-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}




.tool-btn-icon {
    font-size: 13px;
}

/* Results Grid - Compact */
.tool-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.tool-result-card {
    border-radius: 5px;
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.tool-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Original Results Card */
.tool-original-result {
    background: linear-gradient(135deg, rgba(27, 164, 200, 0.05) 0%, rgba(27, 164, 200, 0.1) 100%);
    border: 1px solid rgba(27, 164, 200, 0.2);
}

.tool-original-result:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.tool-original-result:hover {
    border-color: var(--primary);
}

/* New Results Card */
.tool-new-result {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.05) 0%, rgba(6, 214, 160, 0.1) 100%);
    border: 1px solid rgba(6, 214, 160, 0.2);
}

.tool-new-result:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--success);
}

.tool-new-result:hover {
    border-color: var(--success);
}

/* Ratio Results Card */
.tool-ratio-result {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.tool-ratio-result:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--warning);
}

.tool-ratio-result:hover {
    border-color: var(--warning);
}

/* Result Labels with Icons */
.tool-result-card .tool-result-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 5px;
}

.tool-result-card .tool-result-label i {
    font-size: 11px;
}

.tool-original-result .tool-result-label {
    color: var(--primary-dark);
}

.tool-original-result .tool-result-label i {
    color: var(--primary);
}

.tool-new-result .tool-result-label {
    color: var(--success);
}

.tool-new-result .tool-result-label i {
    color: var(--success);
}

.tool-ratio-result .tool-result-label {
    color: #e6a700;
}

.tool-ratio-result .tool-result-label i {
    color: var(--warning);
}

.tool-result-value {
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0 3px;
    line-height: 1.2;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 24px;
}

.tool-original-result .tool-result-value {
    color: var(--primary-dark);
}

.tool-new-result .tool-result-value {
    color: var(--success);
}

.tool-ratio-result .tool-result-value {
    color: #e6a700;
}

.tool-result-unit {
    font-size: 11px;
    color: var(--text-light);
    opacity: 0.8;
    margin-top: 2px;
    font-weight: 500;
}

/* Compliance Status - Compact */
.tool-compliance {
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
    background: var(--light-bg);
    border: 1px solid var(--border);
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s;
}

.tool-compliance.compliant {
    background: rgba(6, 214, 160, 0.08);
    border-color: var(--success);
}

.tool-compliance.non-compliant {
    background: rgba(255, 107, 107, 0.08);
    border-color: var(--danger);
}

.tool-compliance-status {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tool-compliance.compliant .tool-compliance-status {
    color: var(--success);
}

.tool-compliance.non-compliant .tool-compliance-status {
    color: var(--danger);
}

.tool-compliance-details {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.4;
}

.tool-compliance-details p {
    margin: 4px 0;
}

/* Information Panel - Compact */
.tool-info-panel {
    background: rgba(27, 164, 200, 0.04);
    border-left: 3px solid var(--primary);
    padding: 12px;
    border-radius: 5px;
    margin-top: 20px;
}

.tool-info-title {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.tool-info-content {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.tool-info-content p {
    margin: 5px 0;
}

.tool-info-content strong {
    color: var(--text);
}

.tool-info-content em {
    color: var(--primary);
    font-style: italic;
}

/* Message Styles */
.tool-message {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 12px 16px;
    border-radius: 5px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
    max-width: 300px;
    font-size: 13px;
}

.tool-message-success {
    border-left-color: var(--success);
}

.tool-message-error {
    border-left-color: var(--danger);
}

.tool-message-warning {
    border-left-color: var(--warning);
}

.tool-message i {
    font-size: 15px;
}

.tool-message-success i {
    color: var(--success);
}

.tool-message-error i {
    color: var(--danger);
}

.tool-message-warning i {
    color: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar Styling */
.tool-left-panel::-webkit-scrollbar,
.tool-right-panel::-webkit-scrollbar {
    width: 6px;
}

.tool-left-panel::-webkit-scrollbar-track,
.tool-right-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tool-left-panel::-webkit-scrollbar-thumb,
.tool-right-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.tool-left-panel::-webkit-scrollbar-thumb:hover,
.tool-right-panel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Responsive Design */
@media (max-width: 992px) {
    .tool-content {
        flex-direction: column;
    }
    
    .tool-left-panel {
        flex: none;
        padding: 10px;
    }
    
    .tool-right-panel {
        flex: none;
        padding: 10px;
    }
    
    .tool-container {
       /* margin: 10px;*/
    }
}

@media (max-width: 768px) {
    .tool-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .tool-section {
        padding: 12px;
    }
    
    .tool-left-panel,
    .tool-right-panel {
        padding: 12px;
    }
    
    .tool-form-section {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .tool-results-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tool-buttons {
        flex-direction: column;
    }
    
    .tool-btn {
        width: 100%;
        padding: 12px;
    }
    
    .tool-container {
/*        margin: 5px;
        border-radius: 4px;*/
    }
    
    .tool-section-title {
        font-size: 14px;
    }
    
    .tool-result-value {
        font-size: 16px;
    }
    
    .tool-section-subtitle {
        font-size: 12px;
    }
}

/* Input number styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
}

/* Focus states for accessibility */
.tool-input:focus-visible,
.tool-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Disabled state */
.tool-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.tool-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading state */
.tool-loading {
    position: relative;
    opacity: 0.7;
}

.tool-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error state for inputs */
.tool-input.error {
    border-color: var(--danger);
    background-color: rgba(255, 107, 107, 0.05);
}

.tool-input.error:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Success state for inputs */
.tool-input.success {
    border-color: var(--success);
    background-color: rgba(6, 214, 160, 0.05);
}

.tool-input.success:focus {
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1);
}

/* Compact mode for smaller screens */
.tool-compact .tool-form-group {
    margin-bottom: 10px;
}

.tool-compact .tool-section {
    padding: 10px;
    margin-bottom: 10px;
}

.tool-compact .tool-result-card {
    padding: 8px;
    min-height: 70px;
}

.tool-compact .tool-result-value {
    font-size: 16px;
}




/* Dropdown styling */
.tool-input {
    font-size: 14px;
    line-height: 1.5;
}

.tool-input optgroup {
    font-weight: bold;
    font-size: 13px;
    color: var(--primary);
    padding: 5px 0;
    background: rgba(27, 164, 200, 0.05);
}

.tool-input option {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tool-input optgroup option {
    padding-left: 20px;
    font-weight: normal;
    color: var(--text);
    background: white;
}

.tool-input option:hover {
    background: var(--primary) !important;
    color: white !important;
}

.tool-input option:checked {
    background: var(--primary) !important;
    color: white !important;
}

/* Scrollbar for dropdown */
.tool-input {
    max-height: 300px;
    overflow-y: auto;
}

.tool-input::-webkit-scrollbar {
    width: 8px;
}

.tool-input::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tool-input::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.tool-input::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Category colors */
.tool-input optgroup[label*="ULTRA HD"] {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.tool-input optgroup[label*="COMPUTER"] {
    color: #1ba4c8;
    background: rgba(27, 164, 200, 0.05);
}

.tool-input optgroup[label*="ULTRAWIDE"] {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.05);
}

.tool-input optgroup[label*="CINEMA"] {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.tool-input optgroup[label*="TV"] {
    color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.tool-input optgroup[label*="iPHONE"] {
    color: #333;
    background: rgba(51, 51, 51, 0.05);
}

.tool-input optgroup[label*="iPAD"] {
    color: #666;
    background: rgba(102, 102, 102, 0.05);
}

.tool-input optgroup[label*="ANDROID"] {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}

.tool-input optgroup[label*="FACEBOOK"] {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.05);
}

.tool-input optgroup[label*="INSTAGRAM"] {
    color: #e4405f;
    background: rgba(228, 64, 95, 0.05);
}

.tool-input optgroup[label*="TWITTER"] {
    color: #1da1f2;
    background: rgba(29, 161, 242, 0.05);
}

.tool-input optgroup[label*="YOUTUBE"] {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.05);
}

.tool-input optgroup[label*="PINTEREST"] {
    color: #e60023;
    background: rgba(230, 0, 35, 0.05);
}

.tool-input optgroup[label*="LINKEDIN"] {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.05);
}

.tool-input optgroup[label*="PHOTOGRAPHY"] {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
}

.tool-input optgroup[label*="PRINT"] {
    color: #8e44ad;
    background: rgba(142, 68, 173, 0.05);
}

.tool-input optgroup[label*="WEB"] {
    color: #2c3e50;
    background: rgba(44, 62, 80, 0.05);
}

.tool-input optgroup[label*="COMMON"] {
    color: #1abc9c;
    background: rgba(26, 188, 156, 0.05);
}

.tool-input optgroup[label*="LEGACY"] {
    color: #7f8c8d;
    background: rgba(127, 140, 141, 0.05);
}

.tool-input optgroup[label*="GAMING"] {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

