* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #f60d09;
    --secondary: #17e032;
    --accent: #ff6b6b;
    --light: #dddfef;
    --dark: #333;
    --gray: #666;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;
}

body {
    background: #6c75f6;
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.hero {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.tool-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 25px;
    text-align: center;
    font-size: 2.5rem;
}

.tool-content {
    padding: 25px;
}

.tool-content h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.tool-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tool-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: none;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tool-header h2 {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    background: var(--light);
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--primary);
    color: white;
}

.upload-area {
    border: 2px dashed #6a11cb;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    background-color: #f8f9ff;
}

.upload-area i {
    font-size: 48px;
    color: #6a11cb;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.btn {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 5px;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

.btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    display: none;
    text-align: center;
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.text-tool {
    display: none;
}

.text-input {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    resize: vertical;
}

.text-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray);
}

.option-group select, .option-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

footer {
    text-align: center;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.copyright {
    opacity: 0.8;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}
     a {
  color: inherit;
  text-decoration: none;
}