/*
====================================================
 Image Resizer Tool - Premium Styling
====================================================
*/

:root {
    --navy: #1A2A44;
    --gold: #D4AF37;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --soft-gray: #f5f5f5;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

.tool-page {
    padding-top: 80px;
    min-height: 100vh;
}

.tool-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(26,42,68,0.25);
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMtOS45NDEgMC0xOCA4LjA1OS0xOCAxOHM4LjA1OSAxOCAxOCAxOCAxOC04LjA1OSAxOC0xOC04LjA1OS0xOC0xOC0xOHptMCAzMmMtNy43MzIgMC0xNC02LjI2OC0xNC0xNHM2LjI2OC0xNCAxNCAxNCA2LjI2OCAxNCAxNCA2LjI2OC0xNCAxNC0xNHoiIGZpbGw9InJnYmEoMjEyLDE3NSw1NSwwLjEpIi8+PC9nPjwvc3ZnPg==');
    opacity: 0.1;
}

.premium-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, #F5D76E 100%);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-badge i {
    color: var(--navy);
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: inline-block;
    position: relative;
    z-index: 1;
}

.tool-title i {
    margin-right: 0.5rem;
    color: var(--gold);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tool-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
}

.tool-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto 1rem;
    line-height: 1.6;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Premium Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, #F5D76E 100%);
    color: var(--navy);
    border: none;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
    background: linear-gradient(135deg, #F5D76E 0%, var(--gold) 100%);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.2);
}

.premium-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(26,42,68,0.08), 0 3px 10px rgba(212,175,55,0.05);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid rgba(212,175,55,0.15);
    transition: var(--transition);
    position: relative;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
    z-index: 1;
}

.premium-card:hover {
    box-shadow: 0 8px 32px rgba(26,42,68,0.12), 0 2px 8px rgba(212,175,55,0.15);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, var(--navy) 0%, rgba(26,42,68,0.95) 100%);
    padding: 1.5rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

.card-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.card-body {
    padding: 2rem;
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gold);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(212,175,55,0.03);
    position: relative;
    box-shadow: 0 6px 20px rgba(26,42,68,0.05);
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(26,42,68,0.02) 0%, rgba(212,175,55,0.05) 100%);
    pointer-events: none;
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(212,175,55,0.08);
    border-color: var(--navy);
}

.upload-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Image Preview */
.image-preview-container {
    margin-bottom: 2rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    font-size: 1.4rem;
    color: var(--navy);
    font-weight: 600;
}

.image-preview {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f5f5f5;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.image-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Resize Options */
.options-title {
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--navy);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(212,175,55,0.3);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(26,42,68,0.03);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.2);
}

select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23D4AF37" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Dimension Controls */
.dimension-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dimension-group {
    flex: 1;
}

.lock-aspect {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}

.lock-aspect input {
    display: none;
}

.lock-aspect label {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--soft-gray);
    color: var(--navy);
    transition: var(--transition);
}

.lock-aspect input:checked + label {
    background: var(--gold);
    color: var(--white);
}

/* Button styling moved to the top of the file */

/* Range Slider */
.range-slider {
    margin-top: 0.5rem;
    position: relative;
}

.range-slider::after {
    content: attr(data-value);
    position: absolute;
    right: 0;
    top: -1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
    border-radius: 10px;
    outline: none;
    box-shadow: 0 2px 8px rgba(26,42,68,0.1);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212,175,55,0.5);
    border: 2px solid var(--white);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(212,175,55,0.6);
}

/* Presets */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preset-btn {
    background: var(--white);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 10px rgba(26,42,68,0.03);
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--navy), var(--gold));
    opacity: 0;
    transition: var(--transition);
}

.preset-btn:hover, .preset-btn.active {
    background: rgba(212,175,55,0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26,42,68,0.08);
}

.preset-btn:hover::before, .preset-btn.active::before {
    opacity: 1;
}

.preset-btn.active {
    background: rgba(212,175,55,0.15);
    font-weight: 600;
}

.preset-name {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.3rem;
}

.preset-size {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
    text-align: center;
    position: relative;
    padding: 1rem 0;
}

.action-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    border-radius: 3px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Result Container */
.result-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212,175,55,0.2);
    position: relative;
    background: linear-gradient(135deg, rgba(26,42,68,0.02) 0%, rgba(212,175,55,0.05) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: inset 0 2px 10px rgba(26,42,68,0.03);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}

.result-header h3 {
    font-size: 1.4rem;
    color: var(--navy);
    font-weight: 600;
    position: relative;
    padding-left: 1rem;
}

.result-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--navy), var(--gold));
    border-radius: 2px;
}

.result-header p {
    background: rgba(212,175,55,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    color: var(--navy);
    border: 1px solid rgba(212,175,55,0.2);
}

.result-preview {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--white);
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.08), 0 3px 10px rgba(212,175,55,0.05);
    border: 1px solid rgba(212,175,55,0.1);
    padding: 1rem;
    position: relative;
}

.result-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.download-btn {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn i {
    color: var(--gold);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26,42,68,0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--navy) 0%, #2A3F66 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(26,42,68,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.btn-primary i {
    color: var(--gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26,42,68,0.25);
}

.btn-primary:hover::before {
    left: 100%;
}

/* Features Section */
.features-section {
    margin: 4rem 0;
    position: relative;
    padding: 2rem 0;
    background: linear-gradient(135deg, rgba(26,42,68,0.02) 0%, rgba(212,175,55,0.03) 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.features-section > * {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--navy);
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    border-radius: 3px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(26,42,68,0.05), 0 2px 8px rgba(212,175,55,0.03);
    transition: var(--transition);
    border: 1px solid rgba(212,175,55,0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26,42,68,0.1), 0 5px 15px rgba(212,175,55,0.05);
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--white) 0%, rgba(255,255,255,0.95) 100%);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    text-shadow: 0 3px 10px rgba(212,175,55,0.3);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    transition: var(--transition);
    display: inline-block;
    background: linear-gradient(135deg, rgba(26,42,68,0.03) 0%, rgba(212,175,55,0.05) 100%);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 0.8rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.feature-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.feature-card:hover h3::after {
    width: 60px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: var(--transition);
}

.feature-card:hover p {
    color: var(--navy);
}

/* How to Use Section */
.how-to-section {
    margin: 4rem 0 2rem;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.step-card {
    flex: 1;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    position: relative;
    border: 1px solid rgba(212,175,55,0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.step-card h3 {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tool-title {
        font-size: 2rem;
    }
    
    .dimension-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .lock-aspect {
        margin: 0.5rem 0;
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .tool-header {
        padding: 2rem 1rem;
    }
    
    .tool-container {
        padding: 0 1rem 3rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}
