* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1A1A1A;
    min-height: 100vh;
    color: #FFFFFF;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #FFFFFF;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-co {
    color: #FFFFFF;
}

.logo-hyphen {
    color: #FF6600;
}

.logo-intell {
    color: #FFFFFF;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #FFFFFF;
}

header p {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    color: #FFFFFF;
}

.crop-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 102, 0, 0.2);
    border: 2px solid #FF6600;
    border-radius: 25px;
    padding: 10px 20px;
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

.counter-label {
    color: #FFFFFF;
    opacity: 0.9;
}

.counter-value {
    color: #FF6600;
    font-size: 1.4rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.counter-value.updated {
    animation: pulse 0.3s ease;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #FF6600;
    border-radius: 12px;
    padding: 80px 20px;
    text-align: center;
    background: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    background: #404040;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(255, 102, 0, 0.2);
}

.upload-area.dragover {
    background: #404040;
    border-color: #FF6600;
}

.upload-content {
    pointer-events: none;
}

/* Upload icon removed */

.upload-area h3 {
    color: #FFFFFF;
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-area p {
    color: #FFFFFF;
    font-size: 0.95rem;
    opacity: 0.8;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #FF6600;
    color: #FFFFFF;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: #E55A00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-secondary {
    background: #333333;
    color: #FFFFFF;
    border: 2px solid #FF6600;
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: #FF6600;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.btn-outline {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    font-weight: 600;
}

.btn-outline:hover:not(:disabled) {
    background: #FFFFFF;
    color: #1A1A1A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.image-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.image-panel {
    background: #333333;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    border: 1px solid #404040;
}

.image-panel h3 {
    margin-bottom: 15px;
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 700;
}

.crop-container {
    position: relative;
    display: inline-block;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.crop-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 9;
}

.crop-line {
    position: absolute;
    background: #4CAF50;
    pointer-events: all;
    cursor: move;
    z-index: 11;
}

.crop-line-top,
.crop-line-bottom {
    width: 100%;
    height: 2px;
    left: 0;
}

.crop-line-top {
    top: 0;
    cursor: ns-resize;
}

.crop-line-bottom {
    bottom: 0;
    cursor: ns-resize;
}

.crop-line-left,
.crop-line-right {
    height: 100%;
    width: 2px;
    top: 0;
}

.crop-line-left {
    left: 0;
    cursor: ew-resize;
}

.crop-line-right {
    right: 0;
    cursor: ew-resize;
}

.crop-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: move;
    z-index: 12;
}

.crop-corner-tl {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-corner-tr {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-corner-bl {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-corner-br {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.crop-line:hover,
.crop-corner:hover {
    background: #45a049;
    transform: scale(1.1);
}

.crop-line:active,
.crop-corner:active {
    background: #2e7d32;
}

canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.progress-container {
    background: #333333;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #404040;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #404040;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #FF6600;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #FFFFFF;
    font-weight: 600;
}

.info-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    color: white;
}

.info-section h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 8px 0;
    font-size: 1rem;
    opacity: 0.9;
}

.batch-results {
    background: #333333;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid #FF6600;
}

.batch-results h3 {
    margin-bottom: 20px;
    color: #FFFFFF;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-item {
    background: #404040;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 2px solid #555555;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: #FF6600;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.2);
}

.result-item h4 {
    margin-bottom: 10px;
    color: #FFFFFF;
    font-size: 1rem;
    word-break: break-word;
}

.result-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.result-btn.download {
    background: #2196F3;
    color: white;
}

.result-btn.download:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.result-btn.remove {
    background: #f44336;
    color: white;
}

.result-btn.remove:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.batch-summary {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.batch-summary h4 {
    color: #2e7d32;
    margin-bottom: 5px;
}

.batch-summary p {
    color: #388e3c;
    margin: 0;
}

@media (max-width: 768px) {
    .image-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid #404040;
}

footer p {
    color: #FFFFFF;
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.footer-brand {
    color: #FF6600;
    font-weight: 600;
}
