/* TIFF Signature Resize Tool - Professional Styling */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header-content {
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header h1 i {
    color: #7B68EE;
    font-size: 2.2rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding-bottom: 50px;
}

/* Tool Section */
.tool-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.tool-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #7B68EE;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e9ff 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #6A5ACD;
    background: linear-gradient(135deg, #e6e9ff 0%, #d4d9ff 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f4d4 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #7B68EE;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-text {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.browse-link {
    color: #7B68EE;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.upload-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* File Info */
.file-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #7B68EE;
}

.file-text {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.file-size {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 2px;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Resize Options */
.resize-options {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.resize-options h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.option-group label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.option-group select,
.option-group input[type="number"] {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.option-group select:focus,
.option-group input[type="number"]:focus {
    outline: none;
    border-color: #7B68EE;
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
}

/* Quality Slider */
.quality-slider {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quality-slider input[type="range"] {
    flex: 1;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.quality-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #7B68EE;
    border-radius: 50%;
    cursor: pointer;
}

.quality-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #7B68EE;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.quality-value {
    font-weight: 600;
    color: #7B68EE;
    min-width: 45px;
}

/* Buttons */
.resize-btn,
.download-btn,
.new-file-btn {
    background: linear-gradient(135deg, #7B68EE 0%, #6A5ACD 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 55px;
}

.resize-btn {
    width: 100%;
    margin-top: 10px;
}

.resize-btn:hover,
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.3);
}

.new-file-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.new-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.3);
}

/* Progress Bar */
.progress-container {
    text-align: center;
    padding: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7B68EE, #6A5ACD);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-glow 2s infinite;
}

@keyframes progress-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(123, 104, 238, 0.5); }
    50% { box-shadow: 0 0 20px rgba(123, 104, 238, 0.8); }
}

.progress-text {
    color: #7f8c8d;
    font-weight: 500;
}

/* Preview Section */
.preview-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.preview-section h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.preview-item {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.preview-item canvas {
    max-width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
}

.preview-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.download-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Guide Section */
.guide-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.guide-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

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

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e9ff 100%);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: linear-gradient(135deg, #7B68EE 0%, #6A5ACD 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-content p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Content Section */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.content-main h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    margin-top: 25px;
    font-size: 1.3rem;
}

.content-main h3:first-child {
    margin-top: 0;
}

.content-main p {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: justify;
}

.content-list {
    margin: 20px 0;
    padding-left: 20px;
}

.content-list li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

.content-list li strong {
    color: #7B68EE;
    font-weight: 600;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e9ff 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #7B68EE;
}

.info-box h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box ul li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.info-box ul li:before {
    content: "✓";
    color: #7B68EE;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* FAQ Section */
.faq-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.faq-item {
    background: linear-gradient(135deg, #f8f9ff 0%, #e6e9ff 100%);
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
}

.faq-item h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.internal-links {
    text-align: center;
    line-height: 2;
    font-size: 0.9rem;
}

.internal-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 3px;
}

.internal-links a:hover {
    color: #7B68EE;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(189, 195, 199, 0.3);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .tool-section,
    .guide-section,
    .content-section,
    .faq-section {
        padding: 25px 20px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .download-section {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn,
    .new-file-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.7rem;
    }
    
    .header h1 i {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-text {
        font-size: 1.1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
}