* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    min-height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100"><rect fill="%23722" width="200" height="100"/><rect fill="%238B4513" x="0" y="0" width="99" height="49"/><rect fill="%23A0522D" x="101" y="0" width="99" height="49"/><rect fill="%23A0522D" x="0" y="51" width="99" height="49"/><rect fill="%238B4513" x="101" y="51" width="99" height="49"/><line stroke="%23555" stroke-width="2" x1="0" y1="50" x2="200" y2="50"/><line stroke="%23555" stroke-width="2" x1="100" y1="0" x2="100" y2="100"/></svg>');
    background-size: 200px 100px;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.input-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#quoteInput {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #003d7a;
    border-radius: 5px;
    font-family: 'Georgia', serif;
}

#quoteInput:focus {
    outline: none;
    border-color: #0051a8;
    box-shadow: 0 0 5px rgba(0, 81, 168, 0.3);
}

#addTileBtn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    background: #003d7a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

#addTileBtn:hover {
    background: #0051a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#addTileBtn:active {
    transform: translateY(0);
}

.wall {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    padding: 20px;
}

.tile {
    width: 280px;
    height: 280px;
    background: white;
    border: 12px solid #003d7a;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: tileAppear 0.5s ease-out;
    cursor: grab;
    user-select: none;
}

.tile:active {
    cursor: grabbing;
}

@keyframes tileAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.tile-border {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid #003d7a;
    border-radius: 50%;
    pointer-events: none;
}

.tile-flower {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #003d7a 30%, #0051a8 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tile-flower::before,
.tile-flower::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
}

.tile-flower::before {
    transform: translate(-50%, 0);
}

.tile-flower::after {
    transform: translate(0, -50%);
}

.tile-flower.top-left {
    top: 15px;
    left: 15px;
}

.tile-flower.top-right {
    top: 15px;
    right: 15px;
}

.tile-flower.bottom-left {
    bottom: 15px;
    left: 15px;
}

.tile-flower.bottom-right {
    bottom: 15px;
    right: 15px;
}

.tile-content {
    position: relative;
    z-index: 1;
    font-size: 18px;
    line-height: 1.4;
    color: #003d7a;
    word-wrap: break-word;
    max-height: 100%;
    overflow: auto;
}

.delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #d32f2f;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.tile:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #b71c1c;
    transform: scale(1.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #28a745;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .tile {
        width: 240px;
        height: 240px;
        padding: 25px;
    }
    
    .tile-content {
        font-size: 16px;
    }
    
    #quoteInput {
        min-width: 100%;
    }
    
    .status-indicator {
        width: 100%;
        justify-content: center;
    }
}
