body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    min-height: calc(100vh - 150px);
    padding-bottom: 30px;
}
h1, h2 {
    color: #333;
}
textarea {
    width: 100%;
    height: 120px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#csp-output {
    font-family: 'Monaco', 'Consolas', monospace;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 15px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    cursor: text;
    resize: vertical;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 100px;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    padding-right: 40px;
}
#csp-output:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
#csp-output::placeholder {
    color: #999;
}
.section {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-header h3 {
    margin: 0;
    color: #2196F3;
    font-size: 1.1em;
    font-weight: 500;
    display: flex;
    align-items: center;
}
.directive-status {
    display: inline-block;
    margin-right: 8px;
    font-size: 1.1em;
    line-height: 1;
    vertical-align: middle;
}
.section-content {
    margin-top: 8px;
}
.directive-description {
    margin-top: 5px;
    margin-bottom: 10px;
    color: #666;
    font-style: italic;
    font-size: 0.9em;
}
.values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.value-tag {
    background-color: #2196F3;
    padding: 5px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.value-tag button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
    padding: 0 4px;
}
.value-tag button:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.value-input {
    display: flex;
    margin-top: 10px;
}
.value-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}
.value-input input:focus {
    outline: none;
    border-color: #2196F3;
    border-radius: 4px 0 0 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
}
.value-input button {
    padding: 8px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.value-input button:hover:not(:disabled) {
    background-color: #1976D2;
}
.value-input button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 15px;
}
.btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    transform: translateZ(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary {
    background-color: #2196F3;
    color: white;
    border: none;
}
.btn-primary:hover {
    background-color: #1976D2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}
.btn-danger {
    background-color: #f44336;
}
.btn-danger:hover {
    background-color: #d32f2f;
}
.directive-select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}
.special-values {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.special-value {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    color: #666;
    transition: all 0.2s ease;
}
.special-value:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
    color: #333;
}
.special-value.prefix-value {
    background-color: #fff3e0;
    border-color: #ffe0b2;
    color: #f57c00;
}
.special-value.prefix-value:hover {
    background-color: #ffe0b2;
    border-color: #ffb74d;
    color: #e65100;
}
.special-value .tooltip {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
}
.special-value:hover .tooltip {
    visibility: visible;
    opacity: 1;
}
.parse-result {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.overlay-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}
.textarea-wrapper {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    box-sizing: border-box;
}
.textarea-wrapper textarea {
    width: 100%;
    min-height: 100px;
    margin: 0;
    padding: 0;
    border: none;
    font-family: monospace;
    box-sizing: border-box;
    background: transparent;
    outline: none;
    resize: vertical;
    display: block;
}
.textarea-wrapper .hint {
    margin-top: 8px;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}
.overlay-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}
.overlay-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
#parse-result {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.output-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: 30px 0 40px 0;
}

.output-section h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 1em;
    font-weight: 500;
}

.prefixes, .common-values {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.prefixes h4, .common-values h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#directives-container {
    margin-top: 20px;
}

.csp-explanation {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.csp-explanation p {
    margin: 12px 0;
    padding-left: 32px;
    text-indent: -24px;
}

.csp-explanation code {
    background: #f8f9fa;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    display: inline;
    white-space: nowrap;
}

.csp-explanation code:hover {
    border-color: #2196F3;
    background: #fff;
}

.directive-link {
    text-decoration: none;
    border-bottom: 1px dotted #666;
    color: inherit;
    cursor: pointer;
}

.directive-link:hover {
    border-bottom-style: solid;
}

.boolean-controls {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.boolean-controls .special-value {
    transition: all 0.2s ease;
}

.boolean-controls .special-value.selected {
    background-color: #2196F3;
    border-color: #2196F3;
    color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* GitHub Corner */
.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0%, 100% { transform: rotate(0); }
    20%, 60% { transform: rotate(-25deg); }
    40%, 80% { transform: rotate(10deg); }
}

@media (max-width: 500px) {
    .github-corner:hover .octo-arm {
        animation: none;
    }
    .github-corner .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
}

/* Footer */
.footer {
    margin-top: 50px;
    padding: 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer p {
    margin: 0;
    color: #666;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #2196F3;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer p a {
    color: #2196F3;
    text-decoration: none;
}

.footer p a:hover {
    text-decoration: underline;
}

.main-header {
    text-align: center;
    margin: 40px 0 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.main-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

#csp-output {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Adjust container padding */
.container {
    padding: 0 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Make sure the GitHub corner doesn't overlap with content on mobile */
@media (max-width: 768px) {
    .main-header {
        margin: 20px 0 30px;
        padding-bottom: 20px;
    }
    
    .main-header h1 {
        font-size: 2em;
        padding-right: 60px; /* Space for GitHub corner */
    }
}

/* Add styles for the copy button */
.output-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: none;  /* Hidden by default */
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.copy-button svg {
    width: 16px;
    height: 16px;
    fill: #666;
}

.copy-button.visible {
    display: block;
}

.overlay-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Add new styles for domains container */
.domains-list {
    display: block;
    margin-top: 8px;
    margin-left: 8px;
    padding-left: 0;
}

.domains-list code {
    margin: 4px;
}

.explanation-header {
    margin-bottom: 10px;
}

.explanation-toggle {
    color: #2196F3;
    text-decoration: none;
    border-bottom: 1px dashed #2196F3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.explanation-toggle:hover {
    color: #1976D2;
    border-bottom-color: #1976D2;
}

.toggle-icon {
    font-size: 10px;
    line-height: 1;
}

.explanation-content {
    display: none;
    position: relative;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.explanation-content.expanded {
    display: block;
}

/* Add these styles */
.full-width-input {
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    resize: none;
    outline: none;
}

.full-width-input:focus {
    border: none;
    outline: none;
}

/* Make sure textarea-wrapper has consistent styling */
.textarea-wrapper {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 20px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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

.button-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.csp-info {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.csp-info h2 {
    margin-bottom: 20px;
    color: #333;
}

.csp-info h3 {
    margin: 20px 0 10px;
    color: #444;
}

.csp-info ul {
    list-style-type: none;
    padding-left: 0;
}

.csp-info li {
    margin: 10px 0;
    padding-left: 24px;
    position: relative;
}

.csp-info li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #2196F3;
}
