/* Cannabinoid Web Page Styles */

.cannabinoid-web-container {
    min-height: calc(100vh - 200px);
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8faf8 0%, #e8f5e8 50%, #f0f7f0 100%);
    position: relative;
    overflow: hidden;
}

/* Animated background particles */
.cannabinoid-web-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(164, 207, 165, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 183, 118, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(44, 95, 45, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Web Header */
.web-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 5;
}

.web-title {
    font-size: 3rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    margin-bottom: 1rem;
    opacity: 0;
    animation: journalTitleReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
    position: relative;
}

/* Decorative underline */
.web-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
    opacity: 0.4;
}

.web-subtitle {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    animation: journalTitleReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

/* Web Canvas - Clean minimal design */
.web-canvas {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 900px;
    margin: 0 auto;
    background: linear-gradient(145deg, #f8faf8, #e8f0e8);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    overflow: visible;
}



/* Connections SVG - Clean web lines */
.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: rgba(164, 207, 165, 0.5);
    stroke-width: 2;
    fill: none;
    transition: all 0.3s ease;
}

.connection-line.active {
    stroke: var(--accent-color);
    stroke-width: 3;
    opacity: 1;
}

/* Nodes - 3D spherical design */
.node {
    position: absolute;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    transform-style: preserve-3d;
}

.node-content {
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(164, 207, 165, 0.3);
    position: relative;
    overflow: hidden;
}

/* Central Hemp Node - Larger and cleaner */
.central-node {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.central-node .node-content {
    width: 200px;
    height: 200px;
    background: linear-gradient(145deg, #ffffff, #f0f8f0);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 3px;
    border: 3px solid rgba(164, 207, 165, 0.3);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.central-node .node-icon {
    font-size: 4rem;
    margin: 0;
}

/* Cannabinoid Nodes - Consistent sizing */
.cannabinoid-node .node-content {
    width: 100px;
    height: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* Position nodes in a perfect circle - evenly spaced */
#thc-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-280px);
}
#cbd-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(60deg) translateY(-280px) rotate(-60deg);
}
#cbg-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(120deg) translateY(-280px) rotate(-120deg);
}
#cbn-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg) translateY(-280px) rotate(-180deg);
}
#cbc-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(240deg) translateY(-280px) rotate(-240deg);
}
#thcv-node { 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(300deg) translateY(-280px) rotate(-300deg);
}

/* Clean hover effects */
.node:hover .node-content {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cannabinoid-node:hover .node-content {
    border-color: var(--accent-color);
    border-width: 3px;
}

/* Active state */
.node.active .node-content {
    transform: scale(1.15);
    border-color: var(--accent-color);
    border-width: 3px;
    box-shadow: 0 8px 25px rgba(164, 207, 165, 0.4);
}

/* Sub-nodes container - hidden by default */
.sub-nodes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cannabinoid-node:hover .sub-nodes {
    opacity: 1;
    pointer-events: all;
}

/* Sub-node styling */
.sub-node {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    border: 2px solid rgba(164, 207, 165, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.sub-node:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Info Panel */
.info-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

.info-panel.active {
    right: 0;
}

.close-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-panel:hover {
    color: var(--text-color);
}

.panel-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.panel-content {
    color: #666;
    line-height: 1.8;
}

.panel-content h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.panel-content ul {
    list-style: none;
    padding-left: 0;
}

.panel-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.panel-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* Modal - Enhanced professional design */
.cannabinoid-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cannabinoid-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8faf8);
    border-radius: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 100px rgba(164, 207, 165, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(164, 207, 165, 0.3);
}

.cannabinoid-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.1),
        -3px -3px 6px rgba(255, 255, 255, 0.9);
}

.modal-close:hover {
    color: var(--text-color);
    transform: scale(1.1);
    box-shadow: 
        5px 5px 10px rgba(0, 0, 0, 0.15),
        -5px -5px 10px rgba(255, 255, 255, 1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(164, 207, 165, 0.2);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

.modal-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.modal-subtitle {
    color: #666;
    font-style: italic;
    font-size: 1.1rem;
    opacity: 0.8;
}

.modal-body {
    color: #666;
    line-height: 1.8;
}

.modal-body h3 {
    color: var(--text-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

/* Effects list - Enhanced professional design */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.effect-item {
    background: linear-gradient(145deg, #ffffff, #f5faf5);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    border: 2px solid rgba(164, 207, 165, 0.2);
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.08),
        -4px -4px 8px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.effect-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(164, 207, 165, 0.2), transparent);
    transition: left 0.5s ease;
}

.effect-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.1),
        -6px -6px 12px rgba(255, 255, 255, 1);
}

.effect-item:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .web-canvas {
        height: 600px;
        max-width: 100%;
    }
    
    .web-title {
        font-size: 2rem;
    }
    
    .central-node .node-content {
        width: 120px;
        height: 120px;
        font-size: 1.2rem;
    }
    
    .central-node .node-icon {
        font-size: 2rem;
    }
    
    .cannabinoid-node .node-content {
        width: 70px;
        height: 70px;
        font-size: 0.9rem;
    }
    
    /* Adjust circle radius for mobile */
    #thc-node { transform: translate(-50%, -50%) translateY(-180px); }
    #cbd-node { transform: translate(-50%, -50%) rotate(60deg) translateY(-180px) rotate(-60deg); }
    #cbg-node { transform: translate(-50%, -50%) rotate(120deg) translateY(-180px) rotate(-120deg); }
    #cbn-node { transform: translate(-50%, -50%) rotate(180deg) translateY(-180px) rotate(-180deg); }
    #cbc-node { transform: translate(-50%, -50%) rotate(240deg) translateY(-180px) rotate(-240deg); }
    #thcv-node { transform: translate(-50%, -50%) rotate(300deg) translateY(-180px) rotate(-300deg); }
    
    .info-panel {
        width: 100%;
        right: -100%;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes journalTitleReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(5px);
    }
    50% {
        opacity: 0.7;
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
