/* Box-specific styles */
.box-hero {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.box-header {
    max-width: 600px;
    margin: 0 auto;
}

.box-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.box-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.box-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.box-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.box-container {
    padding: 3rem 0;
    background: #f9fafb;
}

.box-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.mystery-box {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mystery-box:hover {
    transform: scale(1.05);
}

.mystery-box.opening {
    animation: boxShake 0.5s ease-in-out;
}

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

.box-lid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 1rem 1rem 0 0;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

.box-lid.open {
    transform: rotateX(-120deg) translateY(-50%);
    transform-origin: bottom center;
}

.box-bow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 4;
}

.box-shine {
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    border-radius: 50%;
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.box-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
    overflow: hidden;
}

.box-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.box-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

.box-label {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.result-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-header {
    margin-bottom: 1.5rem;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.result-category {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-content {
    margin-bottom: 2rem;
}

.result-description {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.result-tips {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    border-left: 4px solid #8b5cf6;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.box-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.control-group select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.suggestion-history {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.suggestion-history h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
    text-align: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border-left: 4px solid #8b5cf6;
}

.history-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.history-category {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-time {
    font-size: 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.no-history {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
}

.related-tools {
    padding: 3rem 0;
    background: white;
}

.related-tools .section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.related-tools .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-tools .tool-card {
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .box-title {
        font-size: 2rem;
    }
    
    .box-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .box-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .mystery-box {
        width: 250px;
        height: 250px;
    }
    
    .result-card {
        padding: 1.5rem;
    }
    
    .box-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .result-actions {
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .box-hero {
        padding: 2rem 0;
    }
    
    .box-title {
        font-size: 1.75rem;
    }
    
    .mystery-box {
        width: 200px;
        height: 200px;
    }
    
    .box-bow {
        font-size: 1.5rem;
    }
    
    .result-card {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .result-icon {
        font-size: 2rem;
    }
    
    .result-title {
        font-size: 1.25rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.2;
    }
}
