/* src/main/resources/static/css/design-editor.css */

/* — Global layout & theme — */
/* Animated stars background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.stars {
    background: #000 url('../images/stars.jpeg') repeat top center;
    z-index: -2;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    animation: twinkle 10s linear infinite;
}

@keyframes twinkle {
    from { opacity: 0.3; }
    50% { opacity: 0.8; }
    to { opacity: 0.3; }
}

/* Individual star animation */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
    animation: twinkle-star 3s infinite alternate;
    z-index: 1;
}

@keyframes twinkle-star {
    0% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0.2; transform: scale(0.8); }
}

/* Text glow effects */
.text-glow {
    text-shadow: 0 0 10px rgba(255,255,255,0.7),
                 0 0 20px rgba(255,255,255,0.5),
                 0 0 30px rgba(124,59,178,0.3),
                 0 0 40px rgba(124,59,178,0.2);
    animation: pulsate 2s infinite alternate;
}

@keyframes pulsate {
    0% { text-shadow: 0 0 10px rgba(255,255,255,0.7),
                      0 0 20px rgba(255,255,255,0.5),
                      0 0 30px rgba(124,59,178,0.3),
                      0 0 40px rgba(124,59,178,0.2); }
    100% { text-shadow: 0 0 15px rgba(255,255,255,0.9),
                        0 0 25px rgba(255,255,255,0.7),
                        0 0 35px rgba(124,59,178,0.5),
                        0 0 45px rgba(124,59,178,0.3); }
}

/* Animated text */
.animated-text {
    background: linear-gradient(to right, #7c3bb2, #b48ad4, #6930a0, #7c3bb2);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s linear infinite;
}

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

/* Floating animation */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-icon {
    animation: float-icon 3s ease-in-out infinite;
}

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

/* Fade in animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow effect for containers */
.glow-effect {
    box-shadow: 0 0 15px rgba(255,255,255,0.5),
                0 0 30px rgba(124,59,178,0.3);
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 15px rgba(255,255,255,0.5),
                      0 0 30px rgba(124,59,178,0.3); }
    to { box-shadow: 0 0 20px rgba(255,255,255,0.7),
                    0 0 40px rgba(124,59,178,0.5); }
}

/* Metallic card effect */
.metallic-card {
    background: linear-gradient(145deg, 
                rgba(60,60,60,0.7), 
                rgba(20,20,20,0.9),
                rgba(40,40,40,0.8));
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5),
                inset 0 0 10px rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.metallic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.5s;
}

.metallic-card:hover::before {
    left: 100%;
}

.metallic-card:hover {
    transform: translateY(-10px) scale(1.02) rotateY(5deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6),
                0 0 20px rgba(124,59,178,0.4),
                inset 0 0 15px rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
}

/* Button effects */
.pulse-effect {
    animation: pulse 2s infinite;
    position: relative;
    z-index: 1;
}

/* Fix for icon alignment in buttons */
.btn i {
    position: relative;
    top: -2px; /* Position icons slightly higher to align with text */
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 5px; /* Add spacing between icon and text */
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 59, 178, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(124, 59, 178, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 59, 178, 0); }
}

.pulse-on-hover:hover {
    animation: pulse 1s infinite;
}

.shine-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
}

.shine-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.3), 0 0 10px rgba(124, 59, 178, 0.4);
}

.shine-effect:hover::after {
    animation: shine 1.5s ease-out;
    opacity: 1;
}

@keyframes shine {
    0% { left: -50%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

/* Neon button effect */
.btn-red {
    position: relative;
    overflow: hidden;
    background-color: #7c3bb2;
    border-color: #7c3bb2;
    color: #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.7);
    box-shadow: 0 0 10px rgba(124, 59, 178, 0.5),
                0 0 20px rgba(124, 59, 178, 0.3),
                0 0 30px rgba(124, 59, 178, 0.1),
                inset 0 0 15px rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.btn-red:hover, .btn-red:focus {
    background-color: #6930a0;
    border-color: #6930a0;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.9);
    box-shadow: 0 0 15px rgba(124, 59, 178, 0.8),
                0 0 30px rgba(124, 59, 178, 0.5),
                0 0 45px rgba(124, 59, 178, 0.3),
                inset 0 0 20px rgba(255,255,255,0.2);
    transform: translateY(-3px) scale(1.02);
}

/* Parallax section */
.parallax-section {
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease-out;
}
body {
    font-family: 'Roboto', sans-serif;
    color: #fff;
    background-color: #000;
    background-image: url('../images/stars.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    padding-bottom: 60px; /* Add padding to prevent content from being hidden behind the fixed footer */
}
.navbar { box-shadow: 0 2px 4px rgba(255,255,255,0.1); background-color: rgba(0,0,0,0.8) !important; }
.navbar-brand { font-weight: bold; font-size: 1.5rem; }
.navbar-logo { 
    height: 80px;
    width: auto; 
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
    transition: transform 0.3s ease;
}
.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}
.jumbotron {
    background-color: rgba(0,0,0,0.7);
    padding: 4rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(255,255,255,0.1);
    color: #fff;
}
.card {
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(255,255,255,0.2);
}
.btn-primary {
    background-color: #7c3bb2; /* Purple */
    border-color: #7c3bb2;
    position: relative;
    overflow: hidden;
    color: #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.7);
    box-shadow: 0 0 10px rgba(124, 59, 178, 0.5),
                0 0 20px rgba(124, 59, 178, 0.3),
                0 0 30px rgba(124, 59, 178, 0.1),
                inset 0 0 15px rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #6930a0;
    border-color: #5a2a85;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.9);
    box-shadow: 0 0 15px rgba(124, 59, 178, 0.8),
                0 0 30px rgba(124, 59, 178, 0.5),
                0 0 45px rgba(124, 59, 178, 0.3),
                inset 0 0 20px rgba(255,255,255,0.2);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline-primary {
    color: #b48ad4; /* Light Purple */
    border-color: #b48ad4;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 5px rgba(180, 138, 212, 0.7);
    box-shadow: 0 0 10px rgba(180, 138, 212, 0.3),
                0 0 20px rgba(180, 138, 212, 0.1);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: rgba(180, 138, 212, 0.1);
    color: #b48ad4;
    border-color: #b48ad4;
    text-shadow: 0 0 10px rgba(180, 138, 212, 0.9);
    box-shadow: 0 0 15px rgba(180, 138, 212, 0.5),
                0 0 30px rgba(180, 138, 212, 0.3),
                inset 0 0 20px rgba(180, 138, 212, 0.2);
    transform: translateY(-3px) scale(1.02);
}
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    box-shadow: 0 -2px 4px rgba(255,255,255,0.1);
    background-color: transparent !important;
    color: #fff;
    z-index: 1000;
}

/* — Design-Editor specific — */
#design-editor-container {
    width: 100%;
    height: 600px;
    background: transparent; /* Transparent background to show page background */
    position: relative;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8); /* Inner shadow for depth */
    border: 1px solid rgba(255,255,255,0.1); /* Subtle border */
}
#design-editor-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
#design-editor-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background-color: rgba(0,0,0,0.85);
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    min-width: 200px;
    border: 1px solid rgba(255,255,255,0.1);
}
.color-option {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    cursor: pointer;
    border: 2px solid #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}
.color-option:hover { transform: scale(1.1); }
.color-option.purple {
    background: linear-gradient(145deg, #7c3bb2, #5a2a85);
    box-shadow: 0 0 10px 3px rgba(124,59,178,0.7), inset 0 0 5px rgba(255,255,255,0.8);
    border: 2px solid rgba(124,59,178,0.8);
}
.color-option.yellow {
    background: linear-gradient(145deg, #b48ad4, #7c3bb2);
    box-shadow: 0 0 10px 3px rgba(211,211,211,0.7), inset 0 0 5px rgba(255,255,255,0.8);
    border: 2px solid rgba(211,211,211,0.8);
}
.color-option.active {
    border-color: #7c3bb2;
    transform: scale(1.15);
}
.color-option.purple.active {
    box-shadow: 0 0 12px 4px rgba(124,59,178,0.8), inset 0 0 8px rgba(255,255,255,0.9), 0 0 5px 2px rgba(124,59,178,0.7);
}
.color-option.yellow.active {
    box-shadow: 0 0 12px 4px rgba(211,211,211,0.8), inset 0 0 8px rgba(255,255,255,0.9), 0 0 5px 2px rgba(124,59,178,0.7);
}
.brush-size-control {
    width: 100%;
    padding: 10px 0 5px;
    margin-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.brush-size-control .form-label {
    font-size: .9rem;
    opacity: .9;
    margin-right: 8px;
}
#brush-size-value {
    background-color: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #7c3bb2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    min-width: 40px;
    text-align: center;
    display: inline-block;
}
.form-range {
    height: 8px;
    margin-top: 10px;
}
/* slider thumbs/tracks */
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #7c3bb2;
    width: 18px; height: 18px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(124,59,178,0.5);
}
.form-range::-moz-range-thumb {
    background: #7c3bb2;
    width: 18px; height: 18px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(124,59,178,0.5);
}
.form-range::-webkit-slider-runnable-track,
.form-range::-moz-range-track {
    background: rgba(255,255,255,0.2);
    height: 6px;
    border-radius: 3px;
}

/* Designs page styles */
.design-placeholder {
    padding: 2rem 0;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.design-thumbnail {
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* mode toggle tweaks */
.mode-toggle .btn-group {
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-radius: 6px;
    overflow: visible;
    display: flex;
    justify-content: space-between;
}
.mode-toggle .btn {
    width: 30%;
    color: #fff;
    padding: 8px 0;
    font-weight: 600;
    letter-spacing: .5px;
    background-color: rgba(255,255,255,0.1);
    border: none;
    transition: all .2s ease;
    margin: 0 5px;
    border-radius: 6px;
}
.mode-toggle .btn:hover:not(.active) {
    background-color: rgba(255,255,255,0.2);
}
.mode-toggle .btn.active {
    background-color: #7c3bb2;
    box-shadow: 0 0 8px rgba(124,59,178,0.5);
    transform: scale(1.02);
}

/* User avatar styles */
.user-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #7c3bb2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 15px rgba(124,59,178,0.7);
    border: 3px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.user-avatar-large:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(124,59,178,0.9);
    border-color: rgba(255,255,255,0.5);
}

.user-avatar-large i {
    font-size: 70px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Navbar user icon */
.nav-item .bi-person-circle {
    color: #fff;
    text-shadow: 0 0 5px rgba(124,59,178,0.7);
    transition: all 0.3s ease;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Ensure the nav-link containing the icon is properly aligned */
.profile-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    height: 40px; /* Match standard navbar height */
    position: relative;
    top: -3px; /* Position the icon slightly higher than other navbar items */
}

.nav-item:hover .bi-person-circle {
    color: #7c3bb2;
    text-shadow: 0 0 10px rgba(124,59,178,0.9);
    transform: scale(1.1);
}
