/* ROTATE 360° - Professional Image Rotation Styles */

body {
    margin: 0;
    padding: 20px;
    background: #000;
    font-family: Arial, 'Times New Roman', serif;
    color: #000;
    position: relative;
    overflow-x: hidden;
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 300% 300%;
    animation: gradient 5s ease infinite;
    padding: 20px;
    border: 10px double #000;
    box-shadow: 0 0 20px #ff00ff, 0 0 40px #00ffff;
    text-align: center;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.construction {
    background: #ffff00;
    color: #000;
    font-weight: bold;
    padding: 5px;
    border: 3px solid #000;
    display: inline-block;
    animation: flash 0.5s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.header h1 {
    font-size: 3em;
    margin: 20px 0;
    color: #fff;
    text-shadow:
        0 0 10px #ff00ff,
        0 0 20px #ff00ff,
        0 0 30px #ff00ff,
        0 0 40px #00ffff,
        0 0 70px #00ffff,
        3px 3px 0 #000;
    animation: glow 2s ease-in-out infinite;
    font-family: 'Impact', 'Arial Black', sans-serif;
}

@keyframes glow {
    0%, 100% {
        text-shadow:
            0 0 10px #ff00ff,
            0 0 20px #ff00ff,
            0 0 30px #ff00ff,
            0 0 40px #00ffff,
            0 0 70px #00ffff,
            3px 3px 0 #000;
    }
    50% {
        text-shadow:
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #00ffff,
            0 0 50px #ff00ff,
            0 0 80px #ff00ff,
            3px 3px 0 #000;
    }
}

.glowing {
    animation: rainbow-text 3s linear infinite;
}

@keyframes rainbow-text {
    0% { color: #ff0000; }
    16% { color: #ff7f00; }
    33% { color: #ffff00; }
    50% { color: #00ff00; }
    66% { color: #0000ff; }
    83% { color: #8b00ff; }
    100% { color: #ff0000; }
}

.tagline {
    background: #000;
    color: #00ff00;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    border: 3px solid #00ff00;
    display: inline-block;
    margin-top: 10px;
}

table {
    background: #c0c0c0;
    margin-top: 20px;
}

.sidebar {
    background: #008080;
    color: #fff;
    padding: 10px;
    font-size: 0.9em;
}

.sidebar h3 {
    background: #000080;
    color: #ffff00;
    padding: 5px;
    margin: 0 -10px 10px -10px;
    text-align: center;
    border: 2px solid #ffff00;
}

.sidebar p {
    margin: 5px 0;
}

.sidebar hr {
    border: 1px solid #fff;
    margin: 15px 0;
}

.award {
    background: #ffff00;
    color: #000;
    padding: 10px;
    text-align: center;
    border: 3px solid #000;
    margin-top: 10px;
    font-size: 2em;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-content {
    padding: 20px;
}

.info-box {
    background: linear-gradient(45deg, #ffff00, #ffaa00);
    border: 5px ridge #ff0000;
    padding: 15px;
    margin: 20px 0;
    font-weight: bold;
    color: #000;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.blink {
    font-size: 1.5em;
    color: #ff0000;
    font-weight: bold;
    animation: blink-animation 0.8s step-start infinite;
}

@keyframes blink-animation {
    50% {
        opacity: 0;
    }
}

.upload-zone {
    background: #e0e0e0;
    border: 5px groove #808080;
    padding: 20px;
    margin: 20px 0;
}

#imageInput {
    background: #fff;
    border: 3px solid #000080;
    padding: 10px;
    font-size: 1em;
    display: block;
    margin: 0 auto;
}

#preview {
    margin-top: 15px;
}

#error {
    background: #ff0000;
    color: #fff;
    border: 5px solid #000;
    padding: 15px;
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
    display: none;
    animation: pulse 1s infinite;
}

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

.rotate-btn {
    background: linear-gradient(to bottom, #ff0000, #aa0000);
    color: #ffff00;
    font-size: 1.5em;
    font-weight: bold;
    padding: 20px 40px;
    border: 7px outset #ff0000;
    cursor: pointer;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px #000;
    margin: 20px 0;
    animation: bounce 1s infinite, rainbow-border 2s linear infinite;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rainbow-border {
    0% { border-color: #ff0000; }
    16% { border-color: #ff7f00; }
    33% { border-color: #ffff00; }
    50% { border-color: #00ff00; }
    66% { border-color: #0000ff; }
    83% { border-color: #8b00ff; }
    100% { border-color: #ff0000; }
}

.rotate-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #ff3333, #ff0000);
    transform: scale(1.1);
    animation: bounce 0.5s infinite, rainbow-border 1s linear infinite;
}

.rotate-btn:disabled {
    background: #808080;
    color: #c0c0c0;
    cursor: not-allowed;
    animation: none;
    border-style: inset;
}

#status {
    display: none;
}

#result {
    margin-top: 20px;
}

hr {
    border: 0;
    border-top: 3px solid #808080;
    margin: 20px 0;
}

.hit-counter {
    text-align: center;
    padding: 15px;
    background: #000;
    border: 5px inset #808080;
    margin-top: 20px;
}

.hit-counter img {
    background: #000;
    border: 1px solid #00ff00;
    margin: 0 2px;
}

/* Table styling */
table[border="2"] {
    width: 100%;
    border-collapse: collapse;
}

table[border="2"] td {
    padding: 15px;
    font-style: italic;
}

/* Center tag replacement */
center {
    text-align: center;
}

/* Font tags */
font[size="5"] {
    font-size: 1.5em;
}

font[size="2"] {
    font-size: 0.9em;
}

/* Marquee styling */
marquee {
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    table {
        display: block;
    }

    table tr, table td {
        display: block;
        width: 100% !important;
    }

    .sidebar {
        margin-bottom: 20px;
    }

    .rotate-btn {
        font-size: 1.2em;
        padding: 15px 25px;
    }
}
