body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header p {
    margin: 0;
    opacity: 0.8;
    font-size: 1.1rem;
}

main {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.editor-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.canvas-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ddd;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.canvas-container:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#imageCanvas {
    border: 1px solid #ccc;
    background-color: white;
    max-width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

#controls {
    flex: 0 0 250px;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

#controls:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.control-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-group h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #444;
    display: flex;
    align-items: center;
}

.control-group h3 i {
    margin-right: 8px;
    color: #4CAF50;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.control-row label {
    flex: 0 0 60px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.action-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button i {
    margin-right: 5px;
}

.action-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.action-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-button.full-width {
    width: 100%;
}

#cropButton.active {
    background-color: #f44336;
}

#textButton.active {
    background-color: #2196F3;
}

input[type="file"] {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #4CAF50;
    background-color: #f9f9f9;
}

input[type="range"] {
    flex: 1;
    margin-right: 10px;
    cursor: pointer;
}

input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

select.full-width {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    background-color: white;
    transition: border-color 0.3s;
}

select.full-width:hover {
    border-color: #4CAF50;
}

/* Ad Container Styling */
.ad-container {
    width: 100%;
    max-width: 800px;
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    min-height: 100px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.ad-label {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-bottom {
    margin-top: 30px;
    background-color: #f9f9f9;
    border-top: 3px solid #4CAF50;
}

.ad-sidebar {
    margin-top: 20px;
    padding: 10px;
    min-height: 250px;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: none;
    border: 1px solid #eee;
}

#instructions {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
}

#instructions h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: center;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.instruction-card {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.instruction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instruction-icon {
    font-size: 2rem;
    color: #4CAF50;
    margin-bottom: 10px;
}

.instruction-card h3 {
    margin: 10px 0;
    color: #333;
}

.instruction-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.feature-highlight {
    background-color: #f0f8ff;
    border-left: 4px solid #4285f4;
    padding: 15px;
    margin-top: 30px;
    border-radius: 0 5px 5px 0;
}

.feature-highlight h3 {
    margin-top: 0;
    color: #4285f4;
    display: flex;
    align-items: center;
}

.feature-highlight h3 i {
    margin-right: 8px;
}

.feature-highlight ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.feature-highlight li {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #333;
    color: #fff;
    margin-top: 30px;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #8bc34a;
    text-decoration: underline;
}

/* Tooltip Styling */
#tooltip-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    max-width: 300px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.tooltip.show {
    transform: translateX(0);
    opacity: 1;
}

.tooltip-success {
    background-color: rgba(76, 175, 80, 0.9);
}

.tooltip-error {
    background-color: rgba(244, 67, 54, 0.9);
}

.tooltip-info {
    background-color: rgba(33, 150, 243, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
    
    #controls {
        flex: 1;
        width: 100%;
    }
    
    .instruction-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Animation for new elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instruction-card, .feature-highlight, .action-button {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Delay animation for instruction cards */
.instruction-card:nth-child(1) { animation-delay: 0.1s; }
.instruction-card:nth-child(2) { animation-delay: 0.2s; }
.instruction-card:nth-child(3) { animation-delay: 0.3s; }
.instruction-card:nth-child(4) { animation-delay: 0.4s; }
.instruction-card:nth-child(5) { animation-delay: 0.5s; }
.instruction-card:nth-child(6) { animation-delay: 0.6s; }
.instruction-card:nth-child(7) { animation-delay: 0.7s; }
.instruction-card:nth-child(8) { animation-delay: 0.8s; }
