 :root {
    --bg-dark: #0f0f1a;
    --bg-light: #1a1a2e;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --accent-glow: rgba(45, 130, 255, 0.6);
    --accent-gradient: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at top left, var(--bg-light) 0%, var(--bg-dark) 40%);
}

.resizer-tool {
    width: 100%;
    max-width: 600px;
    background: var(--bg-light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.tool-header h1 {
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tool-header p {
    color: var(--text-secondary);
    margin-top: 5px;
}

.tool-section {
    margin-bottom: 25px;
}

.tool-section h2 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    border-left: 3px solid #2575fc;
    padding-left: 10px;
}

input[type="file"], select {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}

input[type="file"] {
    border-style: dashed;
    color: var(--text-secondary);
    cursor: pointer;
}

img[alt*="Preview"] {
    display: none;
    max-width: 100%;
    margin-top: 15px;
    border-radius: 8px;
}

button, a[id*="download"] {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-decoration: none;
    background: var(--accent-gradient);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover, a[id*="download"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.result-section {
    display: none;
    margin-top: 30px;
    text-align: center;
}

canvas {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    background-color: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--text-primary);
    background-color: rgba(45, 130, 255, 0.1);
    border-bottom: 3px solid #2575fc;
}

.tool-content {
    display: none;
}

.tool-content.active {
    display: block;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .resizer-tool {
        padding: 15px;
    }
    .tool-header h1 {
        font-size: 1.8rem;
    }
    button, a[id*="download"] {
        font-size: 1rem;
    }
}