/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.powered-by {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.powered-by a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    color: white;
    text-decoration: underline;
}

.header-controls {
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dice-btn-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(255, 107, 107, 0.3);
}

.dice-btn-header:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Main Skill Tree Container */
.skill-tree-container {
    flex: 1;
    position: relative;
    padding: 0.75rem;
    overflow: auto;
}

/* Equipment Columns Grid */
.equipment-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 300px));
    gap: 3rem;
    min-height: 150px;
    position: relative;
    z-index: 2;
    justify-content: center;
    max-width: 1300px;
    margin: 0 auto;
}

.equipment-column {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

.equipment-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    pointer-events: none;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.column-header h2 {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.add-equipment-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
    will-change: transform, box-shadow;
}

.add-equipment-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.add-equipment-btn:active {
    transform: scale(1.05) rotate(90deg);
    transition: all 0.1s ease;
}

/* Equipment List */
.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Equipment Cards - Liquid Glass Design */
.equipment-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform: translateY(0);
    will-change: transform, box-shadow, border-color;
    z-index: 2;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: visible;
    margin-bottom: 0.75rem;
}

.equipment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

.equipment-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: rgba(248, 249, 255, 0.9);
}

.equipment-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}

/* Remove background emoji to avoid duplication */

.equipment-card.selected {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9c4 0%, #fff3a0 100%);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.equipment-card.film-camera {
    border-left: 4px solid #e74c3c;
}

.equipment-card.digital-camera {
    border-left: 4px solid #3498db;
}

.equipment-card.lens-equipment {
    border-left: 4px solid #27ae60;
}

.equipment-card.filter-equipment {
    border-left: 4px solid #9b59b6;
}

.equipment-card.film-equipment {
    border-left: 4px solid #f39c12;
}

.equipment-card.has-filter-thread {
    border-left-width: 6px;
}

.equipment-card.pre-populated {
    opacity: 0.9;
}

/* Equipment Card Header */
.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.equipment-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    flex: 1;
    margin-right: 0.4rem;
    line-height: 1.2;
}

.type-indicator {
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.8;
}

.type-indicator.camera-film {
    filter: sepia(1) hue-rotate(320deg) saturate(1.5);
}

.type-indicator.camera-digital {
    filter: sepia(1) hue-rotate(200deg) saturate(1.5);
}

.type-indicator.lens {
    filter: sepia(1) hue-rotate(90deg) saturate(1.5);
}

.type-indicator.filter {
    filter: sepia(1) hue-rotate(270deg) saturate(1.5);
}

.type-indicator.film.custom {
    filter: sepia(1) hue-rotate(30deg) saturate(1.5);
}

.type-indicator.film.preset {
    filter: sepia(1) hue-rotate(45deg) saturate(1.2);
}

/* Equipment Details */
.equipment-details {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.equipment-brand {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.1rem;
    font-size: 0.7rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.05rem;
}

.detail-label {
    font-weight: 500;
    color: #6c757d;
}

.detail-value {
    color: #495057;
    text-align: right;
}

.detail-value.camera-type-film {
    color: #e74c3c;
    font-weight: 500;
}

.detail-value.camera-type-digital {
    color: #3498db;
    font-weight: 500;
}

/* Equipment Actions */
.equipment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equipment-card:hover .equipment-actions {
    opacity: 1;
}

.edit-btn,
.delete-btn {
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.15rem;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Connection Lines SVG */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: #cbd5e0;
    stroke-width: 2;
    fill: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-linecap: round;
    stroke-linejoin: round;
    will-change: stroke, stroke-width, opacity;
}

/* Connection Line States */
.connection-line.selected {
    stroke: #ffd700 !important;
    stroke-width: 3 !important;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
    opacity: 1 !important;
}

.connection-line.highlighted {
    stroke: #667eea !important;
    stroke-width: 3 !important;
    opacity: 0.8 !important;
}

.connection-line.dimmed {
    opacity: 0.3 !important;
}

/* Equipment Card Relationship Highlighting */
.equipment-card.relationship-highlighted {
    border-color: rgba(102, 126, 234, 0.6) !important;
    background: rgba(102, 126, 234, 0.08) !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.25),
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.equipment-card.relationship-dimmed {
    opacity: 0.4 !important;
    transform: scale(0.98);
}

/* Pin Indicator Styles */
.pin-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid white;
    pointer-events: auto;
}

.pin-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.6);
}

.equipment-card.equipment-pinned {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.05) !important;
    position: relative;
}

.equipment-card.equipment-pinned::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff6b6b);
    border-radius: 14px;
    z-index: -1;
    opacity: 0.3;
    animation: pinGlow 2s ease-in-out infinite alternate;
}

@keyframes pinGlow {
    0% {
        opacity: 0.2;
        transform: scale(1);
    }
    100% {
        opacity: 0.4;
        transform: scale(1.02);
    }
}

.connection-line.incompatible {
    stroke: #e74c3c !important;
    stroke-width: 2 !important;
    stroke-dasharray: 2,2 !important;
    opacity: 0.5 !important;
}

.connection-line.optional {
    stroke: #95a5a6 !important;
    stroke-width: 1 !important;
    stroke-dasharray: 8,4 !important;
    opacity: 0.6 !important;
}

.connection-line.hover {
    stroke-width: 3 !important;
    opacity: 0.9 !important;
}

.connection-line.temporary {
    stroke: #667eea !important;
    stroke-width: 3 !important;
    opacity: 0.6 !important;
}

/* Connection Type Specific Styles */
.connection-camera-lens {
    stroke: #cbd5e0;
    stroke-width: 2;
}

.connection-lens-filter {
    stroke: #a0aec0;
    stroke-width: 2;
    stroke-dasharray: 5,5;
}

.connection-camera-film {
    stroke: #e2a610;
    stroke-width: 2;
    stroke-dasharray: 3,3;
}

/* Animation for connection highlighting */
@keyframes connectionPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.connection-line.pulse {
    animation: connectionPulse 1.5s ease-in-out infinite;
}

/* Dice Section */
.dice-section {
    background: white;
    padding: 1rem;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.dice-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    margin-bottom: 0.75rem;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

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

.dice-btn:hover::before {
    left: 100%;
}

.dice-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
}

.dice-btn:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.dice-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

.dice-btn:disabled::before {
    display: none;
}

.selected-equipment-display {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.selected-equipment-content {
    width: 100%;
    text-align: left;
}

.selected-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem;
    background: white;
    border-radius: 3px;
    border: 1px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 0;
    animation: slideInFromBottom 0.5s ease-out forwards;
}

.selected-item:nth-child(1) { animation-delay: 0.1s; }
.selected-item:nth-child(2) { animation-delay: 0.2s; }
.selected-item:nth-child(3) { animation-delay: 0.3s; }
.selected-item:nth-child(4) { animation-delay: 0.4s; }

.selected-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

.selected-item.camera {
    border-left: 4px solid #3498db;
}

.selected-item.lens {
    border-left: 4px solid #27ae60;
}

.selected-item.lens-fixed {
    border-left: 4px solid #95a5a6;
    opacity: 0.9;
}

.selected-item.filter {
    border-left: 4px solid #9b59b6;
}

.selected-item.film {
    border-left: 4px solid #f39c12;
}

.selected-item.film-skipped {
    border-left: 4px solid #95a5a6;
    opacity: 0.8;
}

.item-icon {
    font-size: 1rem;
    line-height: 1;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.1rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.item-specs {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.close-modal:hover {
    color: #333;
}

#modal-title {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-error {
    display: none;
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.field-help {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.form-error-display {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.no-compatible-camera,
.no-compatible-lens {
    color: #6c757d !important;
    font-style: italic;
}

/* Form validation states */
.form-group input:valid:not(:placeholder-shown),
.form-group select:valid {
    border-color: #28a745;
}

.form-group input:invalid:not(:placeholder-shown):not(.error),
.form-group select:invalid:not(.error) {
    border-color: #ffc107;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.submit-btn,
.cancel-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Enhanced Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .equipment-columns {
        gap: 1rem;
    }
    
    .equipment-card {
        padding: 0.4rem;
    }
    
    .equipment-name {
        font-size: 0.75rem;
    }
    
    .equipment-details {
        font-size: 0.6rem;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .equipment-columns {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        gap: 1.5rem;
        max-width: 800px;
    }
    
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem 1.5rem;
    }
    
    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .control-btn,
    .dice-btn-header {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    .skill-tree-container {
        padding: 1rem;
    }
    
    .equipment-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .equipment-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 400px;
    }
    
    .skill-tree-container {
        padding: 0.75rem;
    }
    
    .app-header {
        padding: 0.75rem 1rem;
    }
    
    .app-header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .control-btn,
    .dice-btn-header {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 100px;
        flex: 1;
        max-width: 140px;
    }
    
    .equipment-column {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .column-header h2 {
        font-size: 0.9rem;
    }
    
    .add-equipment-btn {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .equipment-card {
        padding: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .equipment-card:hover {
        transform: translateY(-1px) scale(1.01);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    }
    
    .equipment-name {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .equipment-details {
        font-size: 0.7rem;
    }
    
    .type-indicator {
        font-size: 1rem;
    }
    
    .dice-section {
        padding: 1rem;
    }
    
    .dice-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 1rem;
        display: block;
    }
    
    .selected-equipment-display {
        padding: 0.75rem;
    }
    
    .selected-items {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .selected-item {
        padding: 0.6rem;
    }
    
    .item-name {
        font-size: 0.85rem;
    }
    
    .item-specs {
        font-size: 0.75rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
        max-width: none;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .submit-btn,
    .cancel-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .app-header {
        padding: 0.5rem 0.75rem;
    }
    
    .app-header h1 {
        font-size: 1.1rem;
    }
    
    .header-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .control-btn,
    .dice-btn-header {
        width: 100%;
        max-width: none;
        margin-bottom: 0.25rem;
    }
    
    .skill-tree-container {
        padding: 0.5rem;
    }
    
    .equipment-column {
        padding: 0.5rem;
        border-radius: 6px;
    }
    
    .column-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .column-header h2 {
        font-size: 0.85rem;
    }
    
    .add-equipment-btn {
        width: 26px;
        height: 26px;
    }
    
    .equipment-card {
        padding: 0.6rem;
        border-radius: 6px;
    }
    
    .equipment-header {
        margin-bottom: 0.4rem;
    }
    
    .equipment-name {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .equipment-details {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .detail-row {
        margin-bottom: 0.1rem;
    }
    
    .equipment-actions {
        gap: 0.75rem;
    }
    
    .edit-btn,
    .delete-btn {
        font-size: 0.9rem;
        padding: 0.25rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    .dice-section {
        padding: 0.75rem;
    }
    
    .dice-btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 25px;
    }
    
    .selected-equipment-display {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .selected-item {
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .item-icon {
        font-size: 1.2rem;
    }
    
    .item-name {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .item-specs {
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 1rem;
        width: 98%;
        border-radius: 8px;
    }
    
    #modal-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .close-modal {
        font-size: 1.8rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .equipment-card {
        min-height: 44px; /* iOS accessibility guideline */
    }
    
    .add-equipment-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .edit-btn,
    .delete-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    .dice-btn {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .control-btn,
    .dice-btn-header {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Reduce hover effects on touch devices */
    .equipment-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    }
    
    .add-equipment-btn:hover {
        transform: scale(1.05);
    }
}

/* Touch device specific styles */
.touch-device {
    -webkit-overflow-scrolling: touch;
}

.touch-device .equipment-card {
    cursor: default;
}

.touch-device .equipment-card:active {
    background: #e8f0fe;
    transform: scale(0.98);
}

.touch-device .add-equipment-btn:active {
    transform: scale(0.9);
}

.touch-device .dice-btn:active {
    transform: scale(0.95);
}

/* Orientation-specific styles */
.landscape .header-controls {
    flex-direction: row;
    flex-wrap: wrap;
}

.portrait .header-controls {
    flex-direction: column;
}

.landscape .equipment-columns {
    grid-template-columns: repeat(4, 1fr);
}

.portrait.touch-device .equipment-columns {
    grid-template-columns: 1fr;
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .connection-line {
        will-change: auto; /* Reduce GPU usage on mobile */
    }
    
    .equipment-card {
        will-change: auto;
    }
    
    /* Reduce animation complexity on mobile */
    .dice-rolling {
        animation-duration: 0.8s;
    }
    
    .highlight-animation {
        animation-duration: 0.4s;
    }
    
    /* Optimize scroll performance */
    .skill-tree-container {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .connection-line {
        stroke-width: 1.5;
    }
    
    .connection-line.selected {
        stroke-width: 2.5;
    }
    
    .equipment-card {
        border-width: 0.5px;
    }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .app-header {
        padding: 0.5rem 1rem;
    }
    
    .app-header h1 {
        font-size: 1.1rem;
    }
    
    .header-controls {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .control-btn,
    .dice-btn-header {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    .skill-tree-container {
        padding: 0.5rem;
    }
    
    .equipment-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .dice-section {
        padding: 0.5rem;
    }
    
    .dice-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Styles */
.dark-mode {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
}

.dark-mode .app-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.dark-mode .equipment-column {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dark-mode .equipment-column::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.dark-mode .equipment-card {
    background: rgba(51, 65, 85, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dark-mode .equipment-card:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dark-mode .equipment-name {
    color: #ffffff;
    font-weight: 600;
}

.dark-mode .equipment-details {
    color: #e2e8f0;
}

.dark-mode .detail-label {
    color: #cbd5e0;
}

.dark-mode .detail-value {
    color: #f1f5f9;
    font-weight: 500;
}

.dark-mode .column-header h2 {
    color: #ffffff;
    font-weight: 700;
}

.dark-mode .dice-section {
    background: rgba(30, 41, 59, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .selected-equipment-display {
    background: rgba(45, 55, 72, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .selected-item {
    background: rgba(74, 85, 104, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .modal-content {
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
}

.dark-mode .form-group input,
.dark-mode .form-group select {
    background: rgba(51, 65, 85, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus {
    border-color: #667eea;
    background: rgba(51, 65, 85, 1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.dark-mode .connection-line {
    stroke: rgba(226, 232, 240, 0.8);
    stroke-width: 2;
}

.dark-mode .connection-line.selected {
    stroke: #fbbf24;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9));
}

/* Control button danger variant */
.control-btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}

.control-btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(197, 48, 48, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
}

.btn-danger.btn-ready {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    box-shadow: 0 0 20px rgba(197, 48, 48, 0.5);
}

/* Modal content styling */
.reset-modal-content,
.about-modal-content,
.how-it-works-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.reset-warning {
    background: rgba(254, 178, 178, 0.1);
    border: 1px solid rgba(254, 178, 178, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.reset-warning ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.about-content {
    line-height: 1.6;
    text-align: left;
}

.about-content p {
    text-align: left;
    margin-bottom: 1rem;
}

.about-content h4 {
    text-align: left;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    color: #2c3e50;
    font-size: 1.2rem;
}

.about-content h4:first-child {
    margin-top: 0;
}

/* Author info with photo */
.author-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.author-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-text {
    flex: 1;
}

.author-text p {
    margin-bottom: 1rem;
}

.about-story,
.about-author {
    margin-bottom: 2rem;
}

.cta-section {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.cta-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.cta-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.how-it-works-content .step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 0.75rem;
    color: #2c3e50;
    text-align: left;
    font-size: 1.1rem;
}

.step-content p {
    text-align: left;
    margin: 0;
    line-height: 1.5;
}

.data-info {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2.5rem;
}

.data-info h4 {
    margin-bottom: 1rem;
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Modal title spacing */
.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #2c3e50;
}

.privacy-note {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
}

/* Dark mode for modals */
.dark-mode .reset-warning {
    background: rgba(254, 178, 178, 0.05);
    border-color: rgba(254, 178, 178, 0.2);
}

.dark-mode .cta-section,
.dark-mode .data-info {
    background: rgba(102, 126, 234, 0.05);
}

.dark-mode .privacy-note {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.dark-mode .step-content h4 {
    color: #f7fafc;
}

.dark-mode .cta-description {
    color: #cbd5e0;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .dice-rolling {
        animation: none;
        transform: scale(1.05);
    }
    
    .equipment-card:hover {
        transform: translateY(-1px);
    }
    
    .connection-line {
        transition: none;
    }
}

/* Delete Confirmation Dialog */
.delete-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.delete-confirmation-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.dialog-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.close-dialog {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-dialog:hover {
    background: #f8f9fa;
    color: #333;
}

.dialog-content {
    padding: 1.5rem 2rem;
}

.equipment-info {
    margin-bottom: 1rem;
}

.equipment-preview {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.equipment-preview strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.equipment-type {
    color: #6c757d;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    text-transform: capitalize;
}

.dialog-message {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.orphaned-equipment {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.orphaned-equipment h4 {
    margin: 0 0 0.75rem 0;
    color: #856404;
    font-size: 1rem;
}

.orphaned-equipment ul {
    margin: 0;
    padding-left: 1.5rem;
}

.orphaned-equipment li {
    margin-bottom: 0.5rem;
    color: #856404;
}

.orphaned-equipment li:last-child {
    margin-bottom: 0;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #e9ecef;
}

.delete-confirm-btn,
.delete-cancel-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delete-confirm-btn,
.delete-single-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #dc3545;
    color: white;
}

.delete-confirm-btn:hover,
.delete-single-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.delete-single-btn {
    background: #fd7e14;
}

.delete-single-btn:hover {
    background: #e8690b;
    box-shadow: 0 4px 15px rgba(253, 126, 20, 0.3);
}

.delete-cancel-btn {
    background: #6c757d;
    color: white;
}

.delete-cancel-btn.primary {
    background: #667eea;
}

.delete-cancel-btn:hover {
    background: #5a6268;
}

.delete-cancel-btn.primary:hover {
    background: #5a67d8;
}

/* Enhanced Animation Classes */
@keyframes diceRoll {
    0% { 
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    25% { 
        transform: rotate(90deg) scale(1.15);
        filter: hue-rotate(90deg);
    }
    50% { 
        transform: rotate(180deg) scale(1.05);
        filter: hue-rotate(180deg);
    }
    75% { 
        transform: rotate(270deg) scale(1.15);
        filter: hue-rotate(270deg);
    }
    100% { 
        transform: rotate(360deg) scale(1);
        filter: hue-rotate(360deg);
    }
}

.dice-rolling {
    animation: diceRoll 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6) !important;
}

@keyframes highlightPath {
    0% { 
        opacity: 0.3;
        transform: scale(0.95);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
    100% { 
        opacity: 0.9;
        transform: scale(1);
    }
}

.highlight-animation {
    animation: highlightPath 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes equipmentPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    }
}

.equipment-card.pulse {
    animation: equipmentPulse 1s ease-in-out infinite;
}

@keyframes connectionPulse {
    0% { 
        opacity: 0.6;
        stroke-width: 2;
    }
    50% { 
        opacity: 1;
        stroke-width: 4;
    }
    100% { 
        opacity: 0.6;
        stroke-width: 2;
    }
}

.connection-line.pulse {
    animation: connectionPulse 1.5s ease-in-out infinite;
}

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

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

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

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

.equipment-card {
    animation: fadeInScale 0.3s ease-out;
}

.equipment-card:nth-child(1) { animation-delay: 0.1s; }
.equipment-card:nth-child(2) { animation-delay: 0.2s; }
.equipment-card:nth-child(3) { animation-delay: 0.3s; }
.equipment-card:nth-child(4) { animation-delay: 0.4s; }
.equipment-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes connectionDraw {
    from {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dasharray: 1000;
        stroke-dashoffset: 0;
    }
}

.connection-line.draw-animation {
    animation: connectionDraw 0.8s ease-out;
}

@keyframes selectedGlow {
    0% { 
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    }
    50% { 
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
    }
    100% { 
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    }
}

.equipment-card.selected {
    animation: selectedGlow 2s ease-in-out infinite;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.add-equipment-btn:active,
.dice-btn:active,
.control-btn:active {
    animation: buttonPress 0.15s ease-out;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.delete-confirmation-dialog,
.modal-content {
    animation: dialogSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-success .notification-icon {
    animation: successBounce 0.5s ease-out;
}

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

.notification-error {
    animation: errorShake 0.5s ease-out;
}
/* Noti
fication Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    max-width: 400px;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-line;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #f8f9fa;
    color: #333;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

/* Stack multiple notifications */
.notification:nth-child(n+2) {
    top: calc(20px + (80px * var(--notification-index, 1)));
}

/* Mobile responsive notifications */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100%);
    }
}

/* Button loading states */
.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.control-btn.loading {
    position: relative;
    color: transparent;
}

.control-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Setup Modal Styles */
.setup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.setup-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: setupModalSlideIn 0.3s ease-out;
}

@keyframes setupModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.setup-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.setup-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #6c757d;
}

.setup-content {
    padding: 2rem;
}

.setup-welcome {
    text-align: center;
}

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

.setup-welcome h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.setup-welcome > p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.setup-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.feature-text strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.feature-text p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.setup-note {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    color: #495057;
    font-size: 0.9rem;
    margin-top: 2rem;
}

.setup-step {
    text-align: center;
}

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

.setup-step h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.setup-step > p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.setup-form {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.setup-form .form-group {
    margin-bottom: 1.5rem;
}

.setup-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
}

.setup-form input,
.setup-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.setup-form input:focus,
.setup-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setup-form .field-help {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.setup-form .field-error {
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
    display: none;
}

.optional-equipment {
    text-align: left;
}

.optional-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.optional-section h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.optional-section > p {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.setup-complete {
    text-align: center;
}

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

.setup-complete h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.setup-complete > p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.setup-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.setup-summary h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.equipment-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.summary-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.summary-text {
    color: #495057;
    font-size: 0.9rem;
}

.next-steps {
    text-align: left;
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 1.5rem;
}

.next-steps h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.setup-actions {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.setup-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.setup-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.setup-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.setup-btn-secondary {
    background: #6c757d;
    color: white;
}

.setup-btn-secondary:hover {
    background: #5a6268;
}

.setup-btn-back {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.setup-btn-back:hover {
    background: #e9ecef;
}

.setup-error-display {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-message {
    color: #721c24;
    font-size: 0.9rem;
}

/* Responsive Design for Setup Modal */
@media (max-width: 768px) {
    .setup-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .setup-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .setup-content {
        padding: 1.5rem;
    }
    
    .setup-actions {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column-reverse;
    }
    
    .setup-btn {
        width: 100%;
    }
    
    .setup-features {
        gap: 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .feature-icon {
        margin-top: 0;
    }
}/* Fil
m Stock Selection Modal Styles */
.film-stock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(4px);
}

.film-stock-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: filmModalSlideIn 0.3s ease-out;
}

@keyframes filmModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.film-stock-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.film-stock-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
}

.close-film-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-film-modal:hover {
    background: #f8f9fa;
    color: #495057;
}

.film-stock-search {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.search-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input,
.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.selection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selection-info span {
    color: #6c757d;
    font-size: 0.9rem;
}

.select-all-btn,
.clear-all-btn {
    background: none;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-all-btn:hover,
.clear-all-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.film-stock-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
    max-height: 300px;
}

.film-stock-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.film-stock-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.film-stock-item.selected {
    border-color: #667eea;
    background: #e8f0fe;
}

.film-stock-checkbox input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.film-stock-info {
    flex: 1;
}

.film-stock-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.film-stock-details {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.film-stock-details span {
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.film-brand {
    background: #e3f2fd !important;
    border-color: #bbdefb !important;
    color: #1976d2 !important;
}

.film-iso {
    background: #f3e5f5 !important;
    border-color: #ce93d8 !important;
    color: #7b1fa2 !important;
}

.film-type {
    background: #e8f5e8 !important;
    border-color: #a5d6a7 !important;
    color: #388e3c !important;
}

.film-format {
    background: #fff3e0 !important;
    border-color: #ffcc02 !important;
    color: #f57c00 !important;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.custom-film-section {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.custom-film-section h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.custom-film-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 0.75rem;
}

.custom-film-form input,
.custom-film-form select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
}

.add-custom-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.add-custom-btn:hover {
    background: #218838;
}

.film-stock-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.film-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.film-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.film-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.film-btn-secondary {
    background: #6c757d;
    color: white;
}

.film-btn-secondary:hover {
    background: #5a6268;
}

.film-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    border-radius: 0 0 6px 6px;
    font-size: 0.9rem;
    z-index: 10;
}

.film-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.film-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design for Film Stock Modal */
@media (max-width: 768px) {
    .film-stock-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .search-controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .film-stock-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .film-stock-actions {
        flex-direction: column;
    }
    
    .film-btn {
        width: 100%;
    }
}/* Guide
d Workflow Modal Styles */
.guided-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9500;
    backdrop-filter: blur(4px);
}

.guided-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: guidedModalSlideIn 0.3s ease-out;
}

@keyframes guidedModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.guided-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guided-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
}

.close-guided-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-guided-modal:hover {
    background: #f8f9fa;
    color: #495057;
}

.guided-progress {
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.workflow-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-dots {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #667eea;
    transform: scale(1.2);
}

.progress-dot.completed {
    background: #28a745;
}

.step-info {
    font-size: 0.85rem;
    color: #6c757d;
}

.guided-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.guided-step {
    max-width: 500px;
    margin: 0 auto;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.step-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

.guided-form {
    margin-bottom: 2rem;
}

.guided-form .form-group {
    margin-bottom: 1.5rem;
}

.guided-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
}

.guided-form input,
.guided-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.guided-form input:focus,
.guided-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.guided-form .field-help {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.guided-form .field-error {
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.25rem;
    display: none;
}

.compatibility-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.compatibility-info h4 {
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.compatibility-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.compatibility-info li {
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.compatibility-info li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

.compatible-equipment {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.equipment-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.equipment-name {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
}

.equipment-mount {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.equipment-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.equipment-type-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.equipment-type-option:hover:not(.disabled) {
    border-color: #667eea;
    background: #f8f9ff;
}

.equipment-type-option.selected {
    border-color: #667eea;
    background: #e8f0fe;
}

.equipment-type-option.recommended {
    border-color: #28a745;
    background: #f8fff9;
}

.equipment-type-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.option-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.option-content h4 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.option-content p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

.recommended-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.disabled-reason {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #6c757d;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

.guided-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.guided-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guided-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.guided-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.guided-btn-secondary {
    background: #6c757d;
    color: white;
}

.guided-btn-secondary:hover {
    background: #5a6268;
}

.guided-btn-back {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.guided-btn-back:hover {
    background: #e9ecef;
}

.guided-error-display {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
}

.guided-error-display .error-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guided-error-display .error-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.guided-error-display .error-message {
    color: #721c24;
    font-size: 0.9rem;
}

/* Responsive Design for Guided Modal */
@media (max-width: 768px) {
    .guided-modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .guided-header {
        padding: 1rem 1.5rem;
    }
    
    .guided-progress {
        padding: 1rem 1.5rem;
    }
    
    .guided-content {
        padding: 1.5rem;
    }
    
    .guided-actions {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
    }
    
    .guided-btn {
        width: 100%;
    }
    
    .equipment-type-grid {
        grid-template-columns: 1fr;
    }
    
    .step-progress {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Guided Mode Option Dialog Styles */
.guided-option-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9800;
    backdrop-filter: blur(3px);
}

.guided-option-dialog {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: guidedOptionSlideIn 0.3s ease-out;
}

@keyframes guidedOptionSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.guided-option-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.guided-option-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
}

.guided-option-content {
    padding: 2rem;
    text-align: center;
}

.guided-option-content > p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.guided-options {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.guided-option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.guided-option-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.guided-option-btn .option-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.guided-option-btn .option-text {
    flex: 1;
}

.guided-option-btn .option-text strong {
    display: block;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.guided-option-btn .option-text p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

.guided-mode-btn:hover {
    border-color: #28a745;
    background: #f8fff9;
}

.manual-mode-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

/* Responsive Design for Guided Option Dialog */
@media (max-width: 768px) {
    .guided-option-dialog {
        width: 95%;
        margin: 1rem;
    }
    
    .guided-option-header {
        padding: 1rem 1.5rem 0.5rem;
    }
    
    .guided-option-content {
        padding: 1.5rem;
    }
    
    .guided-option-btn {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .guided-option-btn .option-text {
        text-align: center;
    }
}/* E
nhanced Error Handling and Validation Styles */

/* Form Error Display */
.form-error-display {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    color: #c33;
    font-size: 14px;
    line-height: 1.4;
    display: none;
}

.form-error-display.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Field Error Styles */
.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    line-height: 1.3;
}

.field-error.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* Input Error States */
input.error,
select.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
    background-color: rgba(231, 76, 60, 0.02);
}

input.error:focus,
select.error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

/* Success States */
input.success,
select.success {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1) !important;
}

/* Field Help Text */
.field-help {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 4px;
    line-height: 1.3;
}

/* Critical Error Dialog */
.critical-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.critical-error-dialog {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.error-dialog-header {
    background: #e74c3c;
    color: white;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
}

.error-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.error-dialog-content {
    padding: 20px;
}

.error-dialog-content p {
    margin: 0 0 16px 0;
    line-height: 1.5;
    color: #2c3e50;
}

.error-help {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px;
    margin-top: 16px;
}

.error-help h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #2c3e50;
}

.error-help ul {
    margin: 0;
    padding-left: 20px;
}

.error-help li {
    margin-bottom: 4px;
    font-size: 13px;
    color: #5a6c7d;
}

.error-dialog-actions {
    padding: 16px 20px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.error-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #e74c3c;
    color: white;
}

.error-action-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.error-action-btn.secondary {
    background: #95a5a6;
    color: white;
}

.error-action-btn.secondary:hover {
    background: #7f8c8d;
}

/* Enhanced Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
    white-space: pre-line;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* Notification Type Styles */
.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-success {
    border-left: 4px solid #27ae60;
}

.notification-info {
    border-left: 4px solid #3498db;
}

.notification-warning {
    border-left: 4px solid #f39c12;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Real-time Validation Feedback */
.form-group {
    position: relative;
}

.form-group.validating input,
.form-group.validating select {
    border-color: #f39c12;
}

.form-group.valid input,
.form-group.valid select {
    border-color: #27ae60;
}

.form-group.invalid input,
.form-group.invalid select {
    border-color: #e74c3c;
}

/* Validation Icons */
.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

.validation-icon.valid {
    color: #27ae60;
}

.validation-icon.invalid {
    color: #e74c3c;
}

.validation-icon.validating {
    color: #f39c12;
    animation: spin 1s linear infinite;
}

/* Mobile Responsive Error Handling */
@media (max-width: 768px) {
    .critical-error-dialog {
        width: 95%;
        margin: 20px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100%);
    }
    
    .error-dialog-actions {
        flex-direction: column;
    }
    
    .error-action-btn {
        width: 100%;
        margin-bottom: 8px;
    }
}
/* Enh
anced Error Logging and User Feedback Styles */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Enhanced Notification Styles */
.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    max-width: 400px;
    min-width: 300px;
    opacity: 0;
    pointer-events: auto;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Notification Header */
.notification-header {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
    word-wrap: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* Recovery Suggestions */
.notification-recovery {
    padding: 0 16px 12px 48px;
    border-top: 1px solid #ecf0f1;
    background: #f8f9fa;
}

.recovery-title {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 8px;
    margin-top: 12px;
}

.recovery-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recovery-list li {
    font-size: 12px;
    color: #5a6c7d;
    line-height: 1.4;
    margin-bottom: 4px;
    padding-left: 12px;
    position: relative;
}

.recovery-list li:before {
    content: "•";
    color: #95a5a6;
    position: absolute;
    left: 0;
}

.recovery-list li:last-child {
    margin-bottom: 0;
}

/* Notification Actions */
.notification-actions {
    padding: 12px 16px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.notification-action-btn {
    background: #3498db;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.notification-action-btn:active {
    transform: translateY(0);
}

/* Notification Type Styles */
.notification-success {
    border-left: 4px solid #27ae60;
}

.notification-success .notification-icon {
    color: #27ae60;
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-error .notification-icon {
    color: #e74c3c;
}

.notification-error .notification-action-btn {
    background: #e74c3c;
}

.notification-error .notification-action-btn:hover {
    background: #c0392b;
}

.notification-warning {
    border-left: 4px solid #f39c12;
}

.notification-warning .notification-icon {
    color: #f39c12;
}

.notification-warning .notification-action-btn {
    background: #f39c12;
}

.notification-warning .notification-action-btn:hover {
    background: #e67e22;
}

.notification-info {
    border-left: 4px solid #3498db;
}

.notification-info .notification-icon {
    color: #3498db;
}

/* Form Error Display */
.form-error-display {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
    padding: 12px;
    display: none;
}

.form-error-display.show {
    display: block;
}

/* Critical Error Dialog */
.critical-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.critical-error-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.error-dialog-header {
    background: #e74c3c;
    color: white;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
}

.error-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.error-dialog-content {
    padding: 20px;
}

.error-dialog-content p {
    margin: 0 0 16px 0;
    line-height: 1.5;
    color: #2c3e50;
}

.error-help {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
}

.error-help h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #495057;
}

.error-help ul {
    margin: 0;
    padding-left: 20px;
}

.error-help li {
    margin-bottom: 4px;
    font-size: 14px;
    color: #6c757d;
}

.error-dialog-actions {
    padding: 16px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.error-action-btn {
    background: #e74c3c;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.error-action-btn:hover {
    background: #c0392b;
}

.error-action-btn.secondary {
    background: #6c757d;
}

.error-action-btn.secondary:hover {
    background: #5a6268;
}

/* Guided Option Dialog (for error recovery) */
.guided-option-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.guided-option-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.guided-option-header {
    padding: 20px 20px 0 20px;
}

.guided-option-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.guided-option-content {
    padding: 20px;
}

.guided-option-content p {
    margin: 0 0 20px 0;
    color: #5a6c7d;
}

.guided-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guided-option-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.guided-option-btn:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.option-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.option-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.option-text p {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.3;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100%);
    }
    
    .notification-recovery {
        padding-left: 16px;
    }
    
    .critical-error-dialog {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .guided-option-dialog {
        margin: 10px;
    }
    
    .guided-options {
        flex-direction: column;
    }
    
    .guided-option-btn {
        padding: 12px;
        gap: 12px;
    }
    
    .option-icon {
        font-size: 20px;
    }
}

/* Animation for loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Error field highlighting */
.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    line-height: 1.3;
}

.field-error.show {
    display: block;
}/* Visit S
ite Button */
.visit-site-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}

.visit-site-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%) !important;
    transform: translateY(-1px) !important;
}

/* Roll History Section - Compact Design */
.roll-history-section {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.roll-history-section h3 {
    margin-bottom: 0.75rem;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.roll-history-section h3::after {
    content: " (Last 5)";
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

.roll-history-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.roll-history-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.roll-history-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateY(-1px);
}

.roll-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.roll-timestamp {
    font-size: 0.75rem;
    color: #6c757d;
}

.roll-equipment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.roll-equipment-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* Roll Result Modal */
.roll-result-modal-content {
    max-width: 600px;
    width: 90vw;
}

.roll-result-content {
    margin: 1rem 0;
}

.roll-result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.roll-result-actions button {
    min-width: 120px;
}

/* Selected Equipment Display in Modal */
.selected-equipment-content {
    text-align: center;
}

.selected-equipment-content h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.selected-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.selected-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: #667eea;
}

.item-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.item-details {
    flex: 1;
    text-align: left;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.item-specs {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Dark mode styles for new elements */
.dark-mode .roll-history-section {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .roll-history-section h3 {
    color: #ffffff;
    font-weight: 600;
}

.dark-mode .roll-history-item {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
}

.dark-mode .roll-history-item:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.dark-mode .roll-timestamp {
    color: #cbd5e0;
}

.dark-mode .roll-equipment-tag {
    background: rgba(102, 126, 234, 0.4);
    color: #c7d2fe;
}

.dark-mode .selected-item {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
}

.dark-mode .selected-item:hover {
    background: rgba(102, 126, 234, 0.2);
}

.dark-mode .item-name {
    color: #ffffff;
    font-weight: 600;
}

.dark-mode .item-specs {
    color: #cbd5e0;
}

.dark-mode .no-history {
    color: #cbd5e0;
}/* Hov
er-based relationship highlighting */
.equipment-card.hover-highlighted {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    z-index: 10;
}

.equipment-card.hover-compatible {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    box-shadow: 
        0 4px 15px rgba(72, 187, 120, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.connection-line.hover-highlight {
    stroke: #48bb78;
    stroke-width: 3;
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(72, 187, 120, 0.6));
}

/* Updated equipment actions positioning */
.equipment-actions {
    display: flex;
    gap: 0.3rem;
    opacity: 1; /* Always visible */
    align-items: center;
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Updated button styles */
.edit-btn, .delete-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #6c757d;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.edit-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-color: #dc3545;
    transform: scale(1.1);
}

/* Dark mode styles for hover highlighting */
.dark-mode .equipment-card.hover-highlighted {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.3);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dark-mode .equipment-card.hover-compatible {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dark-mode .connection-line.hover-highlight {
    stroke: #10b981;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.9));
}

.dark-mode .edit-btn, .dark-mode .delete-btn {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
    color: #cbd5e0;
}

.dark-mode .edit-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border-color: #667eea;
}

.dark-mode .delete-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-color: #dc3545;
}/*
 Additional dark mode contrast improvements */
.dark-mode .form-group label {
    color: #f1f5f9;
    font-weight: 500;
}

.dark-mode .field-help {
    color: #cbd5e0;
}

.dark-mode .field-error {
    color: #fca5a5;
}

.dark-mode .submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .submit-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dark-mode .cancel-btn {
    background: rgba(51, 65, 85, 0.9);
    color: #cbd5e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .cancel-btn:hover {
    background: rgba(71, 85, 105, 1);
    color: #f1f5f9;
}

.dark-mode .control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #f1f5f9;
}

.dark-mode .control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.dark-mode .dice-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .dice-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.dark-mode .add-equipment-btn {
    background: rgba(16, 185, 129, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .add-equipment-btn:hover {
    background: rgba(5, 150, 105, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}/* Fi
x roll again button background in light mode */
#roll-again-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.3);
    font-size: 0.9rem;
    font-weight: 500;
}

#roll-again-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Dark mode styles for powered by */
.dark-mode .powered-by {
    color: rgba(255, 255, 255, 0.7);
}

.dark-mode .powered-by a {
    color: rgba(255, 255, 255, 0.8);
}

.dark-mode .powered-by a:hover {
    color: white;
}

/* Dark mode for about content */
.dark-mode .about-content h4 {
    color: #ffffff;
}

.dark-mode .modal-content h3 {
    color: #ffffff;
}

.dark-mode .data-info h4 {
    color: #ffffff;
}

.dark-mode .author-photo {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .roll-history-section h3::after {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .header-title {
        align-items: flex-start;
    }
    
    .powered-by {
        font-size: 0.7rem;
    }
    
    .roll-history-section {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}/*
 Responsive styles for author info */
@media (max-width: 600px) {
    .author-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .author-photo {
        width: 100px;
        height: 100px;
    }
    
    .author-text {
        text-align: left;
    }
    
    .modal-content h3 {
        font-size: 1.2rem;
    }
    
    .about-content h4 {
        font-size: 1.1rem;
    }
}/* Neon 
border effects for dice buttons */
.dice-btn, .dice-btn-header, #roll-again-btn {
    position: relative;
    overflow: hidden;
}

.dice-btn::before, .dice-btn-header::before, #roll-again-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, 
        #feca57, #ff9ff3, #54a0ff, #5f27cd);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: neonGlow 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dice-btn:hover::before, .dice-btn-header:hover::before, #roll-again-btn:hover::before {
    opacity: 1;
}

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

/* Enhanced dice button styles */
.dice-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 2px solid transparent;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.dice-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.dice-btn-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 2px solid transparent;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.dice-btn-header:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#roll-again-btn {
    border: 2px solid transparent;
    position: relative;
    z-index: 1;
}

/* Dark mode neon effects */
.dark-mode .dice-btn::before, 
.dark-mode .dice-btn-header::before, 
.dark-mode #roll-again-btn::before {
    background: linear-gradient(45deg, 
        #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, 
        #feca57, #ff9ff3, #54a0ff, #5f27cd);
    opacity: 0.8;
}

.dark-mode .dice-btn:hover::before, 
.dark-mode .dice-btn-header:hover::before, 
.dark-mode #roll-again-btn:hover::before {
    opacity: 1;
}

/* Ensure modal buttons have consistent styling */
.roll-result-actions button {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
}

/* Spinning effect for dice buttons when rolling */
.dice-rolling {
    animation: diceRoll 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6) !important;
}