* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

.moving-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.text-row {
    position: absolute;
    white-space: nowrap;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    text-transform: uppercase;
    width: max-content;
}

.text-row span {
    margin-right: 2rem;
}

.text-row:nth-child(1) {
    top: 5%;
    animation: moveLeft 30s linear infinite;
}

.text-row:nth-child(2) {
    top: 25%;
    animation: moveRight 25s linear infinite;
}

.text-row:nth-child(3) {
    top: 45%;
    animation: moveLeft 35s linear infinite;
}

.text-row:nth-child(4) {
    top: 65%;
    animation: moveRight 30s linear infinite;
}

.text-row:nth-child(5) {
    top: 85%;
    animation: moveLeft 28s linear infinite;
}

.floating-img {
    position: absolute;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    filter: grayscale(100%);
    pointer-events: none;
}

.floating-icon-1 {
    top: 10%;
    left: 10%;
    animation: floatIcon1 20s infinite linear;
}

.floating-icon-2 {
    top: 30%;
    right: 15%;
    animation: floatIcon2 25s infinite linear;
}

.floating-icon-3 {
    bottom: 20%;
    left: 20%;
    animation: floatIcon3 22s infinite linear;
}

@keyframes moveLeft {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes moveRight {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes floatIcon1 {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(100px, 50px) rotate(120deg);
    }
    66% {
        transform: translate(50px, 100px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes floatIcon2 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-50px, 100px) rotate(180deg) scale(1.2);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

@keyframes floatIcon3 {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1.2);
    }
    50% {
        transform: translate(100px, -50px) rotate(180deg) scale(1);
    }
    100% {
        transform: translate(0, 0) rotate(360deg) scale(1.2);
    }
}



.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg,rgb(86, 14, 14),rgb(176, 43, 43),rgb(225, 66, 66),rgb(237, 147, 99));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.2));
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite;
    pointer-events: none;
}

.shape:nth-child(1) {
    width: 200px;
    height: 200px;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 150px;
    height: 150px;
    right: 15%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 300px;
    height: 300px;
    left: 30%;
    top: 40%;
    animation-delay: -10s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    right: 30%;
    top: 30%;
    animation-delay: -15s;
}

.animated-text {
    background: linear-gradient(45deg,rgb(255, 255, 255),rgb(241, 195, 180));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textShine 5s linear infinite;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header {
    margin-bottom: 3rem;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    color: white;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.annotator-container {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.annotator-container:hover {
    transform: translateY(-2px);
}

.upload-container {
    margin-bottom: 2rem;
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

.file-input {
    width: 100%;
    padding: 3rem 2rem;
    font-size: 1rem;
    color: #4a5568;
    border: 2px dashed #cbd5e0;
    border-radius: 1rem;
    background-color: #f7fafc;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.file-input:hover {
    border-color: #4299e1;
    background-color: #ebf8ff;
}

.file-input::file-selector-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background:rgb(218, 72, 53);
    color: white;
    font-weight: 500;
    margin-right: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.file-input::file-selector-button:hover {
    background:rgb(148, 39, 39);
}

.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.uploaded-img {
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    border-radius: 0.75rem;
}

.tooltip {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    padding: 8px;
}

.tooltip-cross {
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg,rgb(237, 23, 23),rgb(215, 16, 16));
    border-radius: 50%;
    cursor: move;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
    transition: transform 0.2s ease;
}

.tooltip-cross:hover {
    transform: scale(1.1);
}

.tooltip-content {
    position: absolute;
    visibility: hidden;
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    min-width: 200px;
    top: 24px;
    left: 50%;
    transform: translate(-50%, 0);
    opacity: 0;
    transition: all 0.2s ease;
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.tooltip-text {
    font-size: 0.9375rem;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tooltip-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.tooltip-button {
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    min-width: 32px;
    min-height: 32px;
    border: none;
    background: #f7fafc;
}

.edit-button {
    color: #4299e1;
}

.edit-button:hover {
    background-color: #ebf8ff;
    color: #2b6cb0;
}

.del-button {
    color: #f56565;
}

.del-button:hover {
    background-color: #fff5f5;
    color: #c53030;
}

.footer {
    margin-top: 3rem;
    text-align: center;
    color: #4a5568;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.save-button {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg,rgb(218, 72, 53),rgb(218, 72, 53));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg,rgb(148, 39, 39),rgb(148, 39, 39));
}

.save-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.save-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .annotator-container {
        padding: 1.5rem;
    }
}