/* Base layout shared across toolbox features */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #5a67d8 0%, #8b5cf6 50%, #ec4899 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.app-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-header {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/cygnets.jpg');
    background-size: auto 100%;
    background-position: center;
    background-repeat: repeat-x;
    border-radius: 20px;
    padding: 24px 28px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.6);
    color: #f9fafb;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-logo {
    font-size: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.app-brand h1 {
    margin: 0;
    font-family: 'Comic Sans MS', 'Chalkduster', 'Bradley Hand', cursive;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg,
        #ff6b6b, #feca57, #48dbfb, #ff9ff3,
        #54a0ff, #5f27cd, #00d2d3, #ff9f43);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 3s ease-in-out infinite;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    transform: rotate(-2deg);
    letter-spacing: 0.1em;
}

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

.app-brand h1:hover {
    transform: rotate(2deg) scale(1.05);
    transition: transform 0.3s ease;
}

.app-brand p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: rgba(249, 250, 251, 0.8);
}

.app-tabs {
    display: flex;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.app-tab {
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #f9fafb;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-tab:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.16);
}

.app-tab.is-active {
    background: rgba(255, 255, 255, 0.3);
    color: #1f2937;
    box-shadow: 0 10px 25px -15px rgba(0, 0, 0, 0.5);
}

.app-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.app-content {
    position: relative;
    flex: 1;
    display: grid;
}

.feature-panel {
    display: none;
}

.feature-panel.is-active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.placeholder-panel {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    color: #1f2937;
    box-shadow: 0 25px 45px -30px rgba(15, 23, 42, 0.4);
}

.placeholder-panel h2 {
    margin-bottom: 12px;
    font-size: 2rem;
}

.placeholder-panel p {
    margin: 0;
    font-size: 1.05rem;
    color: #4b5563;
}

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

@media (max-width: 900px) {
    .app-shell {
        padding: 20px 16px 32px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .app-brand h1 {
        font-size: 1.5rem;
    }

    .app-tabs {
        flex-wrap: wrap;
    }
}
