:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --error-color: #f72585;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7ff;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.tool-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    flex-grow: 1;
}

.upload-section {
    width: 100%;
}

.drop-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.drop-area i {
    font-size: 3rem;
    color: var(--accent-color);
}

.drop-area h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.drop-area p {
    color: #666;
}

.drop-area:hover, .drop-area.active {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.formats {
    font-size: 0.9rem;
    color: #999;
    margin-top: 10px;
}

.editor-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    width: 100%;
    max-width: 500px;
    height: 300px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background-color: #f9f9f9;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.placeholder {
    text-align: center;
    color: #aaa;
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rotation-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.slider-container {
    flex-grow: 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.angle-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    min-width: 50px;
    text-align: center;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: #e9ecef;
    color: var(--dark-color);
}

.secondary-btn:hover {
    background-color: #dee2e6;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    color: var(--dark-color);
}

.icon-btn:hover {
    background-color: #dee2e6;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    background-color: var(--dark-color);
    color: white;
    box-shadow: var(--box-shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--error-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tool-container {
        padding: 20px;
    }

    .drop-area {
        padding: 30px 20px;
    }

    .rotation-controls {
        flex-direction: column;
        gap: 15px;
    }

    .slider-container {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .drop-area h3 {
        font-size: 1.2rem;
    }

    .image-container {
        height: 250px;
    }
}