/* Base Styles */
/* Global animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Common styles */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #1a1a1a, #2d3436, #0f2027, #203a43);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0px,
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 30px
    );
    pointer-events: none;
}

/* Layout */
.container {
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Common UI elements */
button {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.control-group {
    position: relative;
}

/* Inputs */
input[type="text"], 
input[type="file"] {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 16px;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Error message */
#errorMessage {
    background: rgba(255, 59, 48, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

/* Orientation tip */
.orientation-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 10000;
    font-size: 18px;
}

/* Media queries */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}
